From: | Enrico Pirozzi <sscotty71(at)gmail(dot)com> |
---|---|
To: | Jeff Janes <jeff(dot)janes(at)gmail(dot)com> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Question on explain |
Date: | 2013-06-10 12:41:34 |
Message-ID: | 51B5C97E.3050105@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)pgtraining(dot)com
www.enricopirozzi.info - info(at)enricopirozzi(dot)info
Skype sscotty71 - Gtalk sscotty71(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2013-06-10 13:19:38 | Re: My function run successfully with cursor, but can't change table |
Previous Message | Philipp Kraus | 2013-06-10 07:52:27 | databse version |