Re: [GENERAL] a JOIN to a VIEW seems slow - Mailing list pgsql-general

From Frank Millman
Subject Re: [GENERAL] a JOIN to a VIEW seems slow
Date
Msg-id A660D5C7AB774CB0983C9252C1B49585@FrankLaptop
Whole thread Raw
In response to Re: [GENERAL] a JOIN to a VIEW seems slow  (David Rowley <david.rowley@2ndquadrant.com>)
List pgsql-general
 
On 7 October 2017 at 2:49 PM, David Rowley wrote:
>
>
Yeah, PostgreSQL does not make any effort to convert subqueries in the
>
target list into joins. SQL server does.
[...]
>
You'll probably find it'll run faster if you convert the subquery in
>
the target list into a join with a GROUP BY, like ...
>
 
Wow, David, that is perfect – 0.91 seconds. Problem well and truly solved.
 
It took me a little while to modify my original query to use that concept, but now it flies.
 
Many thanks
 
Frank
 

pgsql-general by date:

Previous
From: Hung Phan
Date:
Subject: [GENERAL] table partition problem
Next
From: Andreas Joseph Krogh
Date:
Subject: [GENERAL] OR-clause support for indexes