On Mon, Jul 22, 2024 at 3:52 AM Alexander Korotkov <aekorot...@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