Re: [PERFORM] Pointers needed on optimizing slow SQL statements

2009-06-07 Thread Robert Haas
On Sat, Jun 6, 2009 at 4:50 AM, Simon Riggs wrote: > The Function Index solution works, but it would be much better if we > could get the planner to remember certain selectivities. I agree. > I'm thinking a command like > >        ANALYZE foo [WHERE ] > > which would specifically analyze the

Re: [PERFORM] Pointers needed on optimizing slow SQL statements

2009-06-07 Thread Dimitri Fontaine
Hi, Le 6 juin 09 à 10:50, Simon Riggs a écrit : On Wed, 2009-06-03 at 21:21 -0400, Robert Haas wrote: But, we're not always real clever about selectivity. Sometimes you have to fake the planner out, as discussed here. [...] Fortunately, these kinds of problems are fairly rare, but they can