Re: Query plan excluding index on view - Mailing list pgsql-performance

From Tom Lane
Subject Re: Query plan excluding index on view
Date
Msg-id 4767.1207288167@sss.pgh.pa.us
Whole thread Raw
In response to Re: Query plan excluding index on view  ("Matt Klinker" <mklinker@gmail.com>)
Responses Re: Query plan excluding index on view  ("Matt Klinker" <mklinker@gmail.com>)
List pgsql-performance
"Matt Klinker" <mklinker@gmail.com> writes:
> Sorry for not including this extra bit originally.  Below is the explain
> detail from both the query to the view that takes longer and then the query
> directly to the single table that performs quickly.
...
>         ->  Subquery Scan *SELECT* 1  (cost=0.00..1285922.80 rows=18384890
> width=251)
>               ->  Seq Scan on company  (cost=0.00..1102073.90 rows=18384890

The presence of a Subquery Scan node tells me that either this is a much
older PG version than you stated, or there are some interesting details
to the query that you omitted.  Please drop the fan-dance routine and
show us a complete reproducible test case.

            regards, tom lane

pgsql-performance by date:

Previous
From: "Matt Klinker"
Date:
Subject: Re: Query plan excluding index on view
Next
From: Ow Mun Heng
Date:
Subject: Forcing more agressive index scans for BITMAP AND