Re: Transient plans versus the SPI API - Mailing list pgsql-hackers

From Jeff Davis
Subject Re: Transient plans versus the SPI API
Date
Msg-id 1312502173.21934.9.camel@jdavis-ux.asterdata.local
Whole thread Raw
In response to Re: Transient plans versus the SPI API  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Wed, 2011-08-03 at 12:19 -0400, Tom Lane wrote:
> Of course we could address the worst cases by providing some mechanism
> to tell the plancache code "always use a generic plan for this query"
> or "always use a custom plan".  I'm not entirely thrilled with that,
> because it's effectively a planner hint and has got the same problems
> as all planner hints, namely that users are likely to get it wrong.

I'm not entirely convinced by that. It's fairly challenging for a human
to choose a good plan for a moderately complex SQL query, and its much
more likely that the plan will become a bad one over time. But, in many
cases, a developer knows if they simply don't care about planning time,
and are willing to always replan.

Also, we have a fairly reasonable model for planning SQL queries, but
I'm not sure that the model for determining whether to replan a SQL
query is quite as clear. Simon brought up some useful points along these
lines.

Regards,Jeff Davis



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: plperl crash with Debian 6 (64 bit), pl/perlu, libwww and https
Next
From: Jeff Davis
Date:
Subject: Re: Transient plans versus the SPI API