| От | Tom Lane |
|---|---|
| Тема | Re: Inefficient query plan |
| Дата | |
| Msg-id | 21464.1282576855@sss.pgh.pa.us обсуждение |
| Ответ на | Re: Inefficient query plan (Alvaro Herrera <alvherre@commandprompt.com>) |
| Список | pgsql-performance |
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Hmm, I'm placing bets on the bpchar weirdness. I'd try getting rid of
> that and using plain varchar for all the columns.
That's certainly what's inhibiting it from considering an indexscan
on the larger table. I'm not as convinced as the OP that a nestloop
indexscan is really going to win compared to the hash plan, but if
the comparison value is varchar then an index on a bpchar column
is simply not useful --- at least not unless you stick an explicit
cast into the query, so that the comparison will have bpchar rather
than varchar semantics.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера