Re: EXPLAIN ANALYZE of BRIN bitmap index scan with disjunction
От | Michael Lewis |
---|---|
Тема | Re: EXPLAIN ANALYZE of BRIN bitmap index scan with disjunction |
Дата | |
Msg-id | CAHOFxGpB_5dLgXe0+1ZQrn1TaO+BpCC3HFh4not5UVY4Dowccg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: EXPLAIN ANALYZE of BRIN bitmap index scan with disjunction (Simon Riggs <simon@2ndquadrant.com>) |
Ответы |
Re: EXPLAIN ANALYZE of BRIN bitmap index scan with disjunction
|
Список | pgsql-performance |
For kicks I tried the example given and got the below which seems more expected.
explain analyze select * from brin_test where id >= 90000;
explain analyze select * from brin_test where id >= 90000 and r in (1,3);
explain analyze select * from brin_test where id >= 90000;
Bitmap Heap Scan on brin_test (cost=5.78..627.36 rows=9861 width=8) (actual time=0.373..7.309 rows=10001 loops=1)
Recheck Cond: (id >= 90000)
Rows Removed by Index Recheck: 3215
Heap Blocks: lossy=59
-> Bitmap Index Scan on idx_brin_test_brin (cost=0.00..3.32 rows=14286 width=0) (actual time=0.018..0.019 rows=640 loops=1)
Index Cond: (id >= 90000)
Planning Time: 0.101 ms
Execution Time: 13.485 ms
Recheck Cond: (id >= 90000)
Rows Removed by Index Recheck: 3215
Heap Blocks: lossy=59
-> Bitmap Index Scan on idx_brin_test_brin (cost=0.00..3.32 rows=14286 width=0) (actual time=0.018..0.019 rows=640 loops=1)
Index Cond: (id >= 90000)
Planning Time: 0.101 ms
Execution Time: 13.485 ms
explain analyze select * from brin_test where id >= 90000 and r in (1,3);
Bitmap Heap Scan on brin_test (cost=3.36..553.50 rows=197 width=8) (actual time=0.390..1.829 rows=200 loops=1)
Recheck Cond: ((id >= 90000) AND (r = ANY ('{1,3}'::integer[])))
Rows Removed by Index Recheck: 13016
Heap Blocks: lossy=59
-> Bitmap Index Scan on idx_brin_test_brin (cost=0.00..3.31 rows=7143 width=0) (actual time=0.026..0.027 rows=1280 loops=1)
Index Cond: ((id >= 90000) AND (r = ANY ('{1,3}'::integer[])))
Planning Time: 0.089 ms
Execution Time: 1.978 ms
Recheck Cond: ((id >= 90000) AND (r = ANY ('{1,3}'::integer[])))
Rows Removed by Index Recheck: 13016
Heap Blocks: lossy=59
-> Bitmap Index Scan on idx_brin_test_brin (cost=0.00..3.31 rows=7143 width=0) (actual time=0.026..0.027 rows=1280 loops=1)
Index Cond: ((id >= 90000) AND (r = ANY ('{1,3}'::integer[])))
Planning Time: 0.089 ms
Execution Time: 1.978 ms
В списке pgsql-performance по дате отправления: