Re: Suboptimal query plans for BETWEEN SYMMETRIC operations

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Suboptimal query plans for BETWEEN SYMMETRIC operations
Дата
Msg-id CAApHDvpGOi0=bDp3jVB6YXTxSNdvt082uNmPK15LaYyD9HT1+Q@mail.gmail.com
обсуждение исходный текст
Ответ на Suboptimal query plans for BETWEEN SYMMETRIC operations  (Mineharu Takahara <mtakahara@yugabyte.com>)
Ответы Re: Suboptimal query plans for BETWEEN SYMMETRIC operations
Список pgsql-bugs
On Fri, 8 Nov 2024 at 08:36, Mineharu Takahara <mtakahara@yugabyte.com> wrote:
> A condition: "col BETWEEN SYMMETRIC val1 AND val2" is currently rewritten to "(((col >= val1) AND (col <= val2)) OR
((col>= val2) AND (col <= val1)))" that would lead to suboptimal plans using an extra Bitmap Index Scan or Index
Scan/IndexOnly Scan with the entire predicate placed in the "Filter" instead of "Index Cond". 

This isn't a bug, it's just something that could perhaps be made more optimal.

If you're interested in making improvements in this area for core
PostgreSQL, then pgsql-hackers is the place to discuss that.

David



В списке pgsql-bugs по дате отправления: