From: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | David Brown <dave(at)spoonguard(dot)org>, PostgreSQL Global Development Group <pgsql-patches(at)postgresql(dot)org>, Charlie Peck <charliep(at)cs(dot)earlham(dot)edu> |
Subject: | Re: Allow pooled connections to list all prepared queries |
Date: | 2004-12-26 03:07:55 |
Message-ID: | 41CE2B0B.50601@familyhealth.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-patches |
> The usefulness of this seems pretty dubious. You aren't going to have a
> bunch of random bits of code sharing a connection; it's going to be a
> single application that probably knows perfectly well exactly which
> queries it needs prepared. So I don't think the stats will pay for
> themselves.
Not true. Personally, I was looking for something like this, before I
decided to go with stored sql procs instead.
The problem is a website that uses persistent connections.
Say we have a query that takes 350ms to get threads in a forum, and half
of that is planning time. Any particular PHP process does not know if a
previous process has already prepared that query or not. So I have to
prepare it every time, deal with errors, etc.
However, I now use sql stored procs as basically 'cached prepared
queries', so it's no longer a problem for me.
Chris
From | Date | Subject | |
---|---|---|---|
Next Message | Christopher Kings-Lynne | 2004-12-26 03:11:00 | Re: Allow pooled connections to list all prepared queries |
Previous Message | David Brown | 2004-12-26 02:08:23 | Re: Allow pooled connections to list all prepared queries |