Palle Girgensohn <girgen(at)pingpong(dot)net> writes:
> Interesting. Yes, I might be that desperate, actually. As desperate as 30 s
> vs 30 ms can get me... :)
> And this one would actually accumulate stats alright? Looks kinda hairy to
> me. It's not really a partial index anymore, but I guess that doesn't
Yeah, it would. The trick is finding a mapping function that will map
all the cases you care about to distinct values.
> How is the behaviour on 7.4 for this stuff? It seems 7.4 does use the
> partial index, but not always, as shown in a previous mail. Will this
> example work on both versions, or just for 8.0?
7.4 doesn't keep stats on functional indexes, so the hack is a
I am not sure why you are seeing different results on 7.4 than 8.0 for
the original example --- 7.4 is certainly not smarter than 8.0, and we
seem to have ruled out the idea that some sort of glitch is confusing
the 8.0 planner.
regards, tom lane
In response to
pgsql-hackers by date
|Next:||From: David Fetter||Date: 2005-01-14 01:43:31|
|Subject: Top-k optimizations?|
|Previous:||From: Michael Fuhr||Date: 2005-01-14 01:25:13|
|Subject: Re: Slow PL/pgSQL 8.0.RC5 (7.4.6. 3times faster)|