Re: pg9.6 segfault using simple query (related to use fk for join estimates)
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: pg9.6 segfault using simple query (related to use fk for join estimates) |
| Дата | |
| Msg-id | 26676.1465235091@sss.pgh.pa.us обсуждение |
| Ответ на | Re: pg9.6 segfault using simple query (related to use fk for join estimates) (Tomas Vondra <tomas.vondra@2ndquadrant.com>) |
| Список | pgsql-hackers |
Tomas Vondra <tomas.vondra@2ndquadrant.com> writes:
> When it comes to improving multiple (multi-column) foreign keys, I think
> it may get way more complicated that it might seem. What if the foreign
> keys overlap, for example? Or what if the keys go in opposite directions
> (cycle). And so on ...
I think you can group all FKs referencing the same table and discard
all their matched join clauses in favor of a single 1/N estimate
(and when I say "discard", that means you don't match those clauses
against later FKs, which should take care of the reciprocal-FK issue).
This is clearly correct if no nulls are involved. We need to make some
estimate of how much to de-rate that figure for nulls, but I don't see
that it's any harder than what's already required for a single multicol
FK.
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера