Re: Automatic function replanning - Mailing list pgsql-hackers

From Lukas Smith
Subject Re: Automatic function replanning
Date
Msg-id 43AB1727.3030902@pooteeweet.org
Whole thread Raw
In response to Re: Automatic function replanning  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: Automatic function replanning
List pgsql-hackers
Bruce Momjian wrote:

> It is an issue for all databases.  We gave a TODO about it:
> 
>     * Flush cached query plans when the dependent objects change,
>       when the cardinality of parameters changes dramatically, or
>       when new ANALYZE statistics are available

Ok, just so I understand this correctly. In the mentioned case the 
cardinality does not really change in regards to the table stats, its 
just thatI happen to use a value that has a different selectivity and 
therefore I may need a different plan. So I do not really see how this 
use case is handled with the above todo, nor do I really see how its 
handled with what Jim suggested earlier. The fact of the matter is that 
for this use case you need to use different query plans for the same 
prepared statements.

regards,
Lukas


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Automatic function replanning
Next
From: "Jim C. Nasby"
Date:
Subject: Re: Automatic function replanning