| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | "Cyril VELTER" <cyril(dot)velter(at)metadys(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Prepared queries |
| Date: | 2004-02-11 23:12:51 |
| Message-ID: | 23569.1076541171@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
"Cyril VELTER" <cyril(dot)velter(at)metadys(dot)com> writes:
> I'm converting an application to use the V3 protocol features in the 7.4
> libpq. As I need to make a design choice regarding the use of prepared
> statements, I'm wondering what ressources does a prepared statement use on
> the server ? If I need to create several hundred in each backend, is there a
> big memory overhead ?
It'd depend on the complexity of the query plans, but I'd think order of a
few KB per query.
> What's the time spent by the backend to find one
> prepared statement into a list of several hundreds of them ?
The prepared queries are indexed by a hash table, so the lookup time
should be fairly constant independent of their number.
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2004-02-11 23:23:50 | Re: createdb feature request |
| Previous Message | Richard Huxton | 2004-02-11 22:49:37 | Re: DB cache size strategies |