| От | Tom Lane |
|---|---|
| Тема | Re: Hash Join not using hashed index? |
| Дата | |
| Msg-id | 14589.962175604@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Hash Join not using hashed index? (Ang Chin Han <angch@pintoo.com>) |
| Ответы |
Re: Hash Join not using hashed index?
|
| Список | pgsql-sql |
Hash joins don't have anything to do with hash indexes.
A hash join is a join that makes use of a temporary hashtable
built on-the-fly *in memory* for that join.
The planner could choose to use an indexscan on a hash index
as an input for the join, but it'd only be likely to do so
if there is a restriction clause matching the index. In your
example you have only a join WHERE clause.
Plain btree indexes on city.country_id and country.country_id
might work better --- at least they'd offer the option of
a merge join without doing explicit sort.
regards, tom lane
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера