| От | Tom Lane |
|---|---|
| Тема | Re: Indices arent being used |
| Дата | |
| Msg-id | 6354.1064682842@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Indices arent being used (rantunes@student.dei.uc.pt) |
| Список | pgsql-performance |
rantunes@student.dei.uc.pt writes:
> Here is the explain analyze of the query:
> explain analyze select count(*) from actvars, prodlevel where
> actvars.product_level=prodlevel.code_level and
> prodlevel.division_level='OY3S5LAPALL6';
> [ slow merge join ]
I wonder whether a hash join wouldn't work better. Can you force a hash
join? (Try "enable_mergejoin = 0" and if needed "enable_nestloop = 0";
don't disable seqscans though.) If you can get such a plan, please post
the explain analyze results for it.
> This method forces the indices to work but it looks like it takes a long to
> finish executing, I had to cancel the query after 10 min.
"Force use of the indexes" is not always an answer to performance issues.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера