Re: pg9.6 segfault using simple query (related to use fk for join estimates)

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: pg9.6 segfault using simple query (related to use fk for join estimates)
Дата
Msg-id
24068.1465230882@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
pg9.6 segfault using simple query (related to use fk for join estimates) Stefan Huehner <stefan@huehner.org>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Michael Paquier <michael.paquier@gmail.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Julien Rouhaud <julien.rouhaud@dalibo.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tom Lane <tgl@sss.pgh.pa.us>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Julien Rouhaud <julien.rouhaud@dalibo.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tom Lane <tgl@sss.pgh.pa.us>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) David Rowley <david.rowley@2ndquadrant.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) David Rowley <david.rowley@2ndquadrant.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tom Lane <tgl@sss.pgh.pa.us>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Robert Haas <robertmhaas@gmail.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Robert Haas <robertmhaas@gmail.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Robert Haas <robertmhaas@gmail.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Robert Haas <robertmhaas@gmail.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tom Lane <tgl@sss.pgh.pa.us>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Robert Haas <robertmhaas@gmail.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) David Rowley <david.rowley@2ndquadrant.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tom Lane <tgl@sss.pgh.pa.us>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) David Rowley <david.rowley@2ndquadrant.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Simon Riggs <simon@2ndQuadrant.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Simon Riggs <simon@2ndQuadrant.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Robert Haas <robertmhaas@gmail.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Noah Misch <noah@leadboat.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Noah Misch <noah@leadboat.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Noah Misch <noah@leadboat.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Noah Misch <noah@leadboat.com>
Re: Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tom Lane <tgl@sss.pgh.pa.us>
Re: Re: pg9.6 segfault using simple query (related to use fk for join estimates) Noah Misch <noah@leadboat.com>
Re: Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tom Lane <tgl@sss.pgh.pa.us>
Re: Re: pg9.6 segfault using simple query (related to use fk for join estimates) Robert Haas <robertmhaas@gmail.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Robert Haas <robertmhaas@gmail.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tom Lane <tgl@sss.pgh.pa.us>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tom Lane <tgl@sss.pgh.pa.us>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tom Lane <tgl@sss.pgh.pa.us>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tom Lane <tgl@sss.pgh.pa.us>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tom Lane <tgl@sss.pgh.pa.us>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tom Lane <tgl@sss.pgh.pa.us>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tomas Vondra <tomas.vondra@2ndquadrant.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) David Rowley <david.rowley@2ndquadrant.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Simon Riggs <simon@2ndQuadrant.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Robert Haas <robertmhaas@gmail.com>
Re: pg9.6 segfault using simple query (related to use fk for join estimates) Tomas Vondra <tomas.vondra@2ndquadrant.com>
... BTW, another thought occurred to me yesterday: it seems like the
existing code hasn't thought through its behavior for multiple foreign
keys very carefully.  That is, suppose we have both "A.J references B.K"
and "A.X references B.Y", as separate FKs not a single multicolumn FK.
The current code goes to some lengths to decide that one of these is
better than the other and then ignore the other.  Why?  Seems to me
that in such a case you want to behave more nearly as you would for a
multicolumn FK, that is discard all the join quals matched to either FK
in favor of a single selectivity estimate based on the number of rows in
the referenced table.  Discarding only the A.J = B.K clause and then
multiplying by the independent selectivity of A.X = B.Y is surely just as
wrong as what we've historically done for multicolumn FKs.  (Correcting
for nulls would take a bit of thought, but I wouldn't be surprised if it
ends up being the same as for the multicolumn-FK case, at least to within
the precision we can hope to get with the available stats for nulls.)
		regards, tom lane


В списке pgsql-hackers по дате отправления
От: David G. Johnston
Дата:
От: Vik Fearing
Дата:
FAQ