| From: | Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Joshua Rubin <jrubin(at)esoft(dot)com>, pgsql-performance(at)postgresql(dot)org |
| Subject: | Re: Persistent Plan Cache |
| Date: | 2009-09-13 19:40:42 |
| Message-ID: | 4AAD4ABA.9060903@enterprisedb.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-performance |
Tom Lane wrote:
> Joshua Rubin <jrubin(at)esoft(dot)com> writes:
>> We have a very large, partitioned, table that we often need to query
>> from new connections, but frequently with similar queries. We have
>> constraint exclusion on to take advantage of the partitioning. This also
>> makes query planning more expensive. As a result, the CPU is fully
>> loaded, all the time, preparing queries, many of which have been
>> prepared, identically, by other connections.
>
> If you're depending on constraint exclusion, it's hard to see how plan
> caching could help you at all. The generated plan needs to vary
> depending on the actual WHERE-clause parameters.
That's what the OP really should've complained about. If we addressed
that, so that a generic plan was created that determines which child
tables can be excluded at run time, there would be no need for the
persistent plan cache.
--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Stephen Frost | 2009-09-13 21:54:51 | Re: Persistent Plan Cache |
| Previous Message | Tom Lane | 2009-09-13 19:21:31 | Re: possible wrong query plan on pg 8.3.5, |