Re: Question on explain
От | Enrico Pirozzi |
---|---|
Тема | Re: Question on explain |
Дата | |
Msg-id | 51B5C97E.3050105@gmail.com обсуждение исходный текст |
Ответ на | Re: Question on explain (Jeff Janes <jeff.janes@gmail.com>) |
Список | pgsql-general |
Il 10/06/2013 04:19, Jeff Janes ha scritto: > On further thought, that is not strange at all. You have two very > selective join conditions, and the planner assumes they are independent, so > that it can multiply the selectivities. But in reality they are completely > (or almost completely) dependent. If the planner knew about cross column > correlations, that might not even help as you can have complete statistical > dependence without having correlation. > > It seems unlikely to me that the timestamp belongs in both tables, since > it's value seems to be completely dependent on the value of the UUID. > > > In any event, it is unlikely the planner would pick a different plan were > it to correctly understand the selectivities, so no harm is done. Although > it is easy to imagine similar queries where that would not be the case. > > Cheers, > > Jeff Thank you very much ;) Enrico -- That's one small step for man; one giant leap for mankind Enrico Pirozzi Tel. +39 0861 1855771 - Mob.+39 328 4164437 - Fax +39 0861 1850310 http://www.pgtraining.com - info@pgtraining.com www.enricopirozzi.info - info@enricopirozzi.info Skype sscotty71 - Gtalk sscotty71@gmail.com
Вложения
В списке pgsql-general по дате отправления: