Re: JOIN to a VIEW makes a real slow query

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-performance(at)nullmx(dot)com
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: JOIN to a VIEW makes a real slow query
Date: 2007-02-13 20:51:48
Message-ID: 11207.1171399908@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"Chuck D." <pgsql-performance(at)nullmx(dot)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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Arjen van der Meijden 2007-02-13 21:05:45 Re: quad or dual core Intel CPUs
Previous Message Mark Stosberg 2007-02-13 20:47:47 Re: cube operations slower than geo_distance() on production server