Re: [GENERAL] Partial indices...
От
Tom Lane
Тема
Re: [GENERAL] Partial indices...
Дата
Msg-id
27300.1065892319@sss.pgh.pa.us
Ответ на
Re: [GENERAL] Partial indices... (Martijn van Oosterhout)
Список
Дерево обсуждения
Partial indices... Dmitry Tkach <dmitry@openratings.com>
Re: [GENERAL] Partial indices... Martijn van Oosterhout <kleptog@svana.org>
Re: [GENERAL] Partial indices... Tom Lane <tgl@sss.pgh.pa.us>
Martijn van Oosterhout writes: > That's very strange. Not really. In the dummy example, the two indexes are exactly the same size and so there is no reason for the planner to prefer one over the other. (Note that the two plans have exactly the same estimated cost.) In a real example, with appropriate statistics from VACUUM or ANALYZE, the planner would tend to prefer the smaller index. If we had code to suppress the extra evaluation of the partial-index condition (which we do not) then possibly the planner would be able to favor the partial index on the grounds of less computation per row. I don't see any simple way to suppress those clauses early enough to let that cost difference figure into planning, though. regards, tom lane
В списке pgsql-bugs по дате отправления