Re: [PERFORM] slow sort

2013-09-12 Thread Maximilian Tyrtania
ightforward. > > cheers > > andrew Ah, yes, only now do I see that the query screams for a CTE. Thanks for the eye opener. Maximilian Tyrtania http://www.contactking.de -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] slow sort

2013-09-11 Thread Maximilian Tyrtania
Thanks, unfortunately it (creating that index) didn't. But I rewrote my query using inline subqueries, which already helped a lot. Thanks again, Maximilian Tyrtania http://www.contactking.de Am 11.09.2013 um 15:58 schrieb bricklen : > > On Wed, Sep 11, 2013 at 3:36 AM, Maximili

[PERFORM] slow sort

2013-09-11 Thread Maximilian Tyrtania
: node type count sum of times% of query GroupAggregate 1 610.223 ms 10.5 % Index Scan 5 690.503 ms 11.9 % Merge Join 1 2.096 ms 0.0 % Nested Loop Left Join 3 1203.783 ms 20.7 % Sort1 3304.075 ms 56.9 % , so the s