Re: Sql.pgsql NG unleashed in 8.1
"Stephen R. van den Berg" <[email protected]>
| Newsgroups | gmane.comp.lang.pike.user |
|---|---|
| Message-ID | <[email protected]> |
Stephen R. van den Berg wrote: > The new driver does not have any C-helpers any longer, and preliminary > benchmark tests have not revealed performance loss. Simple serial queries (no simultaneous queries per file descriptor) which return an average of 150 rows show the following comparison, looped enough times to generate a meaningful benchmark: libpq driver: 32.22 s old pgsql driver: 17.55 s new pgsql driver: 11.66 s The speedup is even larger when running multiple parallel queries on a single filedescriptor (the driver multiplexes the queries over the single connection). Efficiency could even be improved using the new proposed fetch_row_array(). The driver supports callback driven queryresults as well. These callbacks currently are called from a separate thread which runs independently from the standard backend. The reason is because the way the datarows are being delivered is through a Thread.Queue object. As far as I can see, the current backend does not support handling a Thread.Queue as an input or output with read/write callbacks. Any suggestions here? -- Stephen.