Re: POC, WIP: OR-clause support for indexes

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: POC, WIP: OR-clause support for indexes
Дата
Msg-id CAPpHfdsp5mWaCS8BtcgPPnnD4LUfQQ1e_wOc3XPwi9ku6cGUrQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: POC, WIP: OR-clause support for indexes  (Alexander Korotkov <aekorotkov@gmail.com>)
Список pgsql-hackers
On Mon, Jul 22, 2024 at 3:52 AM Alexander Korotkov <aekorotkov@gmail.com> wrote:
> Please, check that there is still possibility to the generate BitmapOr plan.
>
> # explain select * from t where (b = 1 or b = 2 or a = 2 or a = 3);
>                                      QUERY PLAN
> ------------------------------------------------------------------------------------
>  Bitmap Heap Scan on t  (cost=326.16..835.16 rows=14999 width=12)
>    Recheck Cond: ((b = 1) OR (b = 2) OR (a = 2) OR (a = 3))
>    ->  BitmapOr  (cost=326.16..326.16 rows=20000 width=0)
>          ->  Bitmap Index Scan on t_b_c_idx  (cost=0.00..151.29
> rows=10000 width=0)
>                Index Cond: (b = 1)
>          ->  Bitmap Index Scan on t_b_c_idx  (cost=0.00..151.29
> rows=10000 width=0)
>                Index Cond: (b = 2)
>          ->  Bitmap Index Scan on t_a_b_idx  (cost=0.00..4.29 rows=1 width=0)
>                Index Cond: (a = 2)
>          ->  Bitmap Index Scan on t_a_b_idx  (cost=0.00..4.29 rows=1 width=0)
>                Index Cond: (a = 3)

Forgot to mention that I have to
# set enable_seqscan = off;
to get this plan.

------
Regards,
Alexander Korotkov
Supabase



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: Patch bug: Fix jsonpath .* on Arrays
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: pg_upgrade and logical replication