Re: Prepared queries

From: "Cyril VELTER" <cyril(dot)velter(at)metadys(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: Prepared queries
Date: 2004-02-12 09:21:28
Message-ID: 070d01c3f149$98730fd0$f901a8c0@cvfixe
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Thanks for your answer. Is there any way to know at runtime the space
effectively occupied by all prepared statements in a backend ?

cyril

----- Original Message -----
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>
Sent: Thursday, February 12, 2004 12:12 AM
Subject: Re: [GENERAL] Prepared queries

> "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
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pascal Polleunus 2004-02-12 10:28:12 error when executing dynamic commands with transaction
Previous Message JM 2004-02-12 09:09:13 Migrating 7.1.3 to 7.3.4 problem