Re: Queries joining views - Mailing list pgsql-general

From Tom Lane
Subject Re: Queries joining views
Date
Msg-id 5132.1156182502@sss.pgh.pa.us
Whole thread Raw
In response to Queries joining views  (Alban Hertroys <alban@magproductions.nl>)
List pgsql-general
Alban Hertroys <alban@magproductions.nl> writes:
> Is there a trick to make this work a bit faster?

Have you really shown us the right queries for those explain results?
I don't see where the second plan is testing "dir <> 1" at all.
It looks like the first one is faster because it's using a partial
index that has predicate dir <> 1, while the second one is using
a much larger full index.  But I don't see where the second plan
is applying that restriction, so I wonder if you forgot it in the
query.

            regards, tom lane

pgsql-general by date:

Previous
From: Jeff Davis
Date:
Subject: setting the value returned by PQcmdTuples
Next
From: Tom Lane
Date:
Subject: Re: Queries joining views