Search Postgresql Archives

Re: Question on explain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx
www.enricopirozzi.info - info@xxxxxxxxxxxxxxxxxx
Skype sscotty71 - Gtalk sscotty71@xxxxxxxxx

<<attachment: smime.p7s>>


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux