Re: JOIN to a VIEW makes a real slow query

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: JOIN to a VIEW makes a real slow query
Дата
Msg-id 11207.1171399908@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: JOIN to a VIEW makes a real slow query  ("Chuck D." <pgsql-performance@nullmx.com>)
Ответы Re: JOIN to a VIEW makes a real slow query  ("Chuck D." <pgsql-performance@nullmx.com>)
Список pgsql-performance
"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

В списке pgsql-performance по дате отправления:

Предыдущее
От: "Chuck D."
Дата:
Сообщение: Re: JOIN to a VIEW makes a real slow query
Следующее
От: Mark Stosberg
Дата:
Сообщение: Re: cube operations slower than geo_distance() on production server