Re: Index correlation versus multi-column indexes

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Re: Index correlation versus multi-column indexes
Дата
Msg-id 1235775674.17675.11.camel@dell.linuxdev.us.dell.com
обсуждение исходный текст
Ответ на Index correlation versus multi-column indexes  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, 2009-02-27 at 13:25 -0500, Tom Lane wrote:
> So apparently we need to rethink this, and derate the correlation effect
> somehow when there are constraints on non-first columns.  I'm not
> entirely sure what the model ought to be.  Thoughts?

This seems similar to the problem of estimating correlation for a GiST
index (as I recall you mentioned before that we should be tracking
correlation per-index rather than per-attribute).

Unless we get significantly smarter about what "correlation" means, I
think its only purpose is for very simple range scans. And, as you point
out, a selective predicate on a non-first attribute means that it's not
really a range scan.

I don't see an easy solution to this other than just saying that a
predicate on a second attribute is not a range scan at all, unless the
predicate is not very selective.

Regards,Jeff Davis



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

Предыдущее
От: Jaime Casanova
Дата:
Сообщение: Re: Updates of SE-PostgreSQL 8.4devel patches (r1530)
Следующее
От: Hannu Krosing
Дата:
Сообщение: Re: xpath processing brain dead