Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rechte=> explain (analyze, buffers) SELECT count(*)
- FROM t_demo
- WHERE id_sorted BETWEEN 10000 AND 20000
- mrechte-> ;
- QUERY PLAN
- ------------------------------------------------------------------------------------------------------------------------------------
- Aggregate (cost=348.77..348.78 rows=1 width=8) (actual time=0.934..0.935 rows=1 loops=1)
- Buffers: shared hit=6 read=28
- -> Index Only Scan using idx_id on t_demo (cost=0.43..322.95 rows=10326 width=0) (actual time=0.017..0.640 rows=10001 loops=1)
- Index Cond: ((id_sorted >= 10000) AND (id_sorted <= 20000))
- Heap Fetches: 0
- Buffers: shared hit=6 read=28
- Planning:
- Buffers: shared hit=37 read=4
- Planning Time: 0.131 ms
- Execution Time: 0.948 ms
- (10 lignes)
- mrechte=> explain (analyze, buffers) SELECT count(*)
- FROM t_demo
- WHERE id_random BETWEEN 10000 AND 10000000;
- QUERY PLAN
- ------------------------------------------------------------------------------------------------------------------------------------
- ----
- Aggregate (cost=408.98..408.99 rows=1 width=8) (actual time=1.137..1.137 rows=1 loops=1)
- Buffers: shared hit=36
- -> Index Only Scan using idx_random on t_demo (cost=0.43..378.69 rows=12113 width=0) (actual time=0.020..0.760 rows=11699 loops
- =1)
- Index Cond: ((id_random >= 10000) AND (id_random <= 10000000))
- Heap Fetches: 0
- Buffers: shared hit=36
- Planning Time: 0.061 ms
- Execution Time: 1.154 ms
- (8 lignes)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement