Re: Question on explain - Mailing list pgsql-general

From Enrico Pirozzi
Subject Re: Question on explain
Date
Msg-id 51B5C97E.3050105@gmail.com
Whole thread Raw
In response to Re: Question on explain  (Jeff Janes <jeff.janes@gmail.com>)
List 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


Attachment

pgsql-general by date:

Previous
From: Philipp Kraus
Date:
Subject: databse version
Next
From: Kevin Grittner
Date:
Subject: Re: My function run successfully with cursor, but can't change table