Re: Join vs Subquery

Поиск
Список
Период
Сортировка
От Gregory Stark
Тема Re: Join vs Subquery
Дата
Msg-id 874pmu2kq0.fsf@oxford.xeocode.com
обсуждение исходный текст
Ответ на Join vs Subquery  (Brian Herlihy <btherl@yahoo.com.au>)
Список pgsql-performance
"Brian Herlihy" <btherl@yahoo.com.au> writes:

> There is a unique index mapping domains to domain_ids.
...
> The issue: the second query results in a lower cost estimate. I am wondering
> why the second query plan was not chosen for the first query.

Well the unique index you mentioned is critical to being able to conclude the
queries are equivalent. Postgres in the past hasn't been able to use things
like unique indexes to make planning decisions because it had no
infrastructure to replan if you dropped the index. We do have such
infrastructure now so it may be possible to add features like this in the
future.

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com


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

Предыдущее
От: Ron
Дата:
Сообщение: Re: Intermitent slow queries
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Join vs Subquery