| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера