Re: Bug? 8.0 does not use partial index

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Bug? 8.0 does not use partial index
Дата
Msg-id 18570.1105666041@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Bug? 8.0 does not use partial index  (Palle Girgensohn <girgen@pingpong.net>)
Список pgsql-hackers
Palle Girgensohn <girgen@pingpong.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 
> matter...

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
nonstarter there.

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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Palle Girgensohn
Дата:
Сообщение: Re: Bug? 8.0 does not use partial index
Следующее
От: David Fetter
Дата:
Сообщение: Top-k optimizations?