| От | Tom Lane |
|---|---|
| Тема | Re: Lack of index usage when doing array casts |
| Дата | |
| Msg-id | 5576.1393009497@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Lack of index usage when doing array casts (Alexey Klyukin <alexk@hintbits.com>) |
| Ответы |
Re: Lack of index usage when doing array casts
|
| Список | pgsql-performance |
Alexey Klyukin <alexk@hintbits.com> writes:
> We had a problem with PostgreSQL not using an index scan in 2 similar
> queries, the only difference between them is the array cast from text[] to
> location_type[] (array of enum values).
Hmm. IIRC the text to enum cast is considered stable not immutable, which
is why that doesn't get folded to a Const on sight. However, it seems
like it'd be okay for scalararraysel() to reduce stable expressions for
estimation purposes, ie it should be using estimate_expression_value.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера