Re: a JOIN to a VIEW seems slow

From: "Frank Millman" <frank(at)chagford(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: a JOIN to a VIEW seems slow
Date: 2017-10-08 08:08:31
Message-ID: A660D5C7AB774CB0983C9252C1B49585@FrankLaptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Joseph Krogh 2017-10-08 08:30:42 OR-clause support for indexes
Previous Message Hung Phan 2017-10-07 16:57:47 table partition problem