explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BiuQ : derived table

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 0.057 ↑ 2.0 2 1

Nested Loop (cost=3.73..7.77 rows=4 width=16) (actual time=0.055..0.057 rows=2 loops=1)

  • Output: t1.c1, t1.c2, t1.count
  • Buffers: shared hit=16
2. 0.002 0.035 ↑ 1.0 1 1

Result (cost=0.87..0.87 rows=1 width=8) (actual time=0.035..0.035 rows=1 loops=1)

  • Output: $0, $1
  • Buffers: shared hit=8
3.          

Initplan (for Result)

4. 0.001 0.020 ↑ 1.0 1 1

Limit (cost=0.42..0.43 rows=1 width=4) (actual time=0.020..0.020 rows=1 loops=1)

  • Output: the_table.count
  • Buffers: shared hit=4
5. 0.019 0.019 ↑ 1,000,000.0 1 1

Index Only Scan using the_table_count_idx on stuff.the_table (cost=0.42..8,247.42 rows=1,000,000 width=4) (actual time=0.019..0.019 rows=1 loops=1)

  • Output: the_table.count
  • Index Cond: (the_table.count IS NOT NULL)
  • Heap Fetches: 0
  • Buffers: shared hit=4
6. 0.000 0.013 ↑ 1.0 1 1

Limit (cost=0.42..0.43 rows=1 width=4) (actual time=0.013..0.013 rows=1 loops=1)

  • Output: the_table_1.count
  • Buffers: shared hit=4
7. 0.013 0.013 ↑ 1,000,000.0 1 1

Index Only Scan Backward using the_table_count_idx on stuff.the_table the_table_1 (cost=0.42..8,247.42 rows=1,000,000 width=4) (actual time=0.013..0.013 rows=1 loops=1)

  • Output: the_table_1.count
  • Index Cond: (the_table_1.count IS NOT NULL)
  • Heap Fetches: 0
  • Buffers: shared hit=4
8. 0.005 0.015 ↑ 2.0 2 1

Bitmap Heap Scan on stuff.the_table t1 (cost=2.87..6.89 rows=4 width=16) (actual time=0.014..0.015 rows=2 loops=1)

  • Output: t1.c1, t1.c2, t1.count
  • Recheck Cond: ((t1.count = ($0)) OR (t1.count = ($1)))
  • Heap Blocks: exact=2
  • Buffers: shared hit=8
9. 0.000 0.010 ↓ 0.0 0 1

BitmapOr (cost=2.87..2.87 rows=4 width=0) (actual time=0.010..0.010 rows=0 loops=1)

  • Buffers: shared hit=6
10. 0.003 0.003 ↑ 2.0 1 1

Bitmap Index Scan on the_table_count_idx (cost=0.00..1.43 rows=2 width=0) (actual time=0.003..0.003 rows=1 loops=1)

  • Index Cond: (t1.count = ($0))
  • Buffers: shared hit=3
11. 0.007 0.007 ↑ 2.0 1 1

Bitmap Index Scan on the_table_count_idx (cost=0.00..1.43 rows=2 width=0) (actual time=0.007..0.007 rows=1 loops=1)

  • Index Cond: (t1.count = ($1))
  • Buffers: shared hit=3
Planning time : 0.163 ms
Execution time : 0.102 ms