pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-performance@nullmx.com
Cc: pgsql-performance@postgresql.org
Subject: Re: JOIN to a VIEW makes a real slow query
Date: Tue, 13 Feb 2007 15:51:48 -0500
Message-ID: <11207.1171399908@sss.pgh.pa.us> (raw)
In-Reply-To: <200702131417.32154.pgsql-performance@nullmx.com>
References: <200702131253.55486.pgsql-performance@nullmx.com>
	<b42b73150702131116ic89dab3q38c103b7c1930384@mail.gmail.com>
	<200702131417.32154.pgsql-performance@nullmx.com>

"Chuck D." <pgsql-performance@nullmx.com> writes:
> It is still using that sequence scan on the view after the APPEND for the 
> us_city and world_city table.  Any reason why the view won't use the indexes 
> when it is JOINed to another table but it will when the view is queried 
> without a JOIN?  I should have mentioned this is v8.1.4.

8.1 isn't bright enough for that.  Should work in 8.2 though.

> Also, does anyone know why this line:
> Join Filter: ("outer".city_id = "inner"."?column1?")
> ... contains "?column1?" instead of the actual column name?

EXPLAIN can't conveniently get access to the column name.  That could
probably be improved if someone wanted to put enough effort into it.

			regards, tom lane



view thread (5+ messages)  latest in thread

Message-ID: <11207.1171399908@sss.pgh.pa.us>
Permalink:  ../11207.1171399908@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/11207.1171399908@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, pgsql-performance@nullmx.com
  Subject: Re: JOIN to a VIEW makes a real slow query
  In-Reply-To: <11207.1171399908@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