Search Postgresql Archives

Re: issue with double ordering in a wrapped distinct

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

 



Jonathan Vanasco <postgres@xxxxxxxx> writes:
> This is what I don't understand -- notice the two order_by calls.  

> 	If i run this with an inner and outer order_by, I get ~305ms.  (I don't think I need both, but I wasn't sure if ordering is kept from a subselect )

> 	If i run this with only the inner, I get ~304ms.

> 	If I run this with only the outer, it's pushing over 10minutes again

> i'm wondering if anyone might know why that performance hit would be happening

The inner ORDER BY would prevent the planner from flattening the two
query levels into one; but as for why it gets a much worse plan after
flattening --- insufficient data.

https://wiki.postgresql.org/wiki/Slow_Query_Questions

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[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