pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Matt Klinker <mklinker@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Query plan excluding index on view
Date: Fri, 04 Apr 2008 01:49:27 -0400
Message-ID: <4767.1207288167@sss.pgh.pa.us> (raw)
In-Reply-To: <3bda20f60804032158u4f6765e3t8b0debad3e7f5ceb@mail.gmail.com>
References: <3bda20f60804031631j177b42e2u82b5033fd23c2293@mail.gmail.com>
	<28177.1207266621@sss.pgh.pa.us>
	<3bda20f60804031654q7991de08m1254964511632acf@mail.gmail.com>
	<29828.1207271948@sss.pgh.pa.us>
	<3bda20f60804032158u4f6765e3t8b0debad3e7f5ceb@mail.gmail.com>

"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



view thread (7+ messages)  latest in thread

Message-ID: <4767.1207288167@sss.pgh.pa.us>
Permalink:  ../4767.1207288167@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/4767.1207288167@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mklinker@gmail.com
  Subject: Re: Query plan excluding index on view
  In-Reply-To: <4767.1207288167@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox