Re: Oddball data distribution giving me planner headaches - Mailing list pgsql-general

From Jeff Amiel
Subject Re: Oddball data distribution giving me planner headaches
Date
Msg-id 1322864433.23717.YahooMailClassic@web65513.mail.ac4.yahoo.com
Whole thread Raw
In response to Re: Oddball data distribution giving me planner headaches  ("David Johnston" <polobo@yahoo.com>)
List pgsql-general

--- On Fri, 12/2/11, David Johnston <polobo@yahoo.com> wrote:

> --------------------------------------------------------
>
> Can you wrap the query into an SQL or PL/pgSQL function so
> that, at least,
> then planner will not be able to see the embedded plan info
> in the outer
> queries?  You use-case may allow you to create one or
> more VIEWs wrapping
> the function call with pre-determined parameters so that
> you do not lose the
> ability to write simple select queries without the need for
> explicit
> function calls.
>
> No idea how that would impact the planner for the other
> queries but maybe
> worth a try while waiting for someone more knowledgeable
> than myself to
> respond.


I had actually considered this...because you can define what the 'row estimate' is for a function....except in my case,
Ihave some dynamic inputs that would change what those estimates would need to be. 
Thanks for the help though!


pgsql-general by date:

Previous
From: "David Johnston"
Date:
Subject: Re: Oddball data distribution giving me planner headaches
Next
From: Jeff Amiel
Date:
Subject: Re: Oddball data distribution giving me planner headaches