Re: Query plan excluding index on view

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Matt Klinker" <mklinker(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Query plan excluding index on view
Date: 2008-04-04 05:49:27
Message-ID: 4767.1207288167@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Matt Klinker" <mklinker(at)gmail(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Matthew 2008-04-04 10:40:30 Re: Forcing more agressive index scans for BITMAP AND
Previous Message Matt Klinker 2008-04-04 04:58:10 Re: Query plan excluding index on view