Re: WIP: cross column correlation ...

Поиск
Список
Период
Сортировка
От Nathan Boley
Тема Re: WIP: cross column correlation ...
Дата
Msg-id AANLkTimLFwakAxeSvjBwBo_sdzGrbeBP9a=BrDkDLn6O@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WIP: cross column correlation ...  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: WIP: cross column correlation ...  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
> Personally, I think the first thing we ought to do is add a real, bona
> fide planner hint to override the selectivity calculation manually,
> maybe something like this:
>
> WHERE (x < 5 AND y = 1) SELECTIVITY (0.1);
>


If you're going to go that far, why not just collect statistics on
that specific predicate?

ie,  ANALYZE SELECTIVITY ON tablename (x, y) WHERE (x < 5 AND y = 1);

Then it won't fall subject to all of the pitfalls that Tom outlines below.

Selectivities are easy to estimate if we know the predicate. They only
become hard when they have to work for every possible predicate.

Best,
Nathan


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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: SSI bug?
Следующее
От: Tatsuo Ishii
Дата:
Сообщение: Re: Correctly producing array literals for prepared statements