explain.depesz.com

PostgreSQL's explain analyze made readable

Result: dc54 : Optimization for: Optimization for: Optimization for: plan #tpe6; plan #PymM; plan #kvej

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.004 0.093 ↑ 1.1 23 1

Append (cost=0.57..10.77 rows=25 width=16) (actual time=0.014..0.093 rows=23 loops=1)

  • Buffers: shared hit=72
2. 0.015 0.015 ↑ 1.0 2 1

Index Only Scan using test_pid_did on test (cost=0.57..1.71 rows=2 width=16) (actual time=0.013..0.015 rows=2 loops=1)

  • Index Cond: ((parent_id = 106) AND (draft_id = 2))
  • Heap Fetches: 0
  • Buffers: shared hit=6
3. 0.011 0.015 ↑ 2.0 1 1

Index Only Scan using test_pid_did on test test_1 (cost=2.28..3.47 rows=2 width=16) (actual time=0.014..0.015 rows=1 loops=1)

  • Index Cond: ((parent_id = 106) AND (draft_id = 1))
  • Filter: (NOT (hashed SubPlan 1))
  • Rows Removed by Filter: 2
  • Heap Fetches: 0
  • Buffers: shared hit=13
4.          

SubPlan (for Index Only Scan)

5. 0.004 0.004 ↑ 1.0 2 1

Index Only Scan using test_pid_did on test test_3 (cost=0.57..1.71 rows=2 width=8) (actual time=0.003..0.004 rows=2 loops=1)

  • Index Cond: ((parent_id = 106) AND (draft_id = 2))
  • Heap Fetches: 0
  • Buffers: shared hit=6
6. 0.023 0.059 ↑ 1.1 20 1

Index Only Scan using test_pid_did on test test_2 (cost=3.19..5.21 rows=21 width=16) (actual time=0.051..0.059 rows=20 loops=1)

  • Index Cond: ((parent_id = 106) AND (draft_id = 0))
  • Filter: (NOT (hashed SubPlan 2))
  • Rows Removed by Filter: 2
  • Heap Fetches: 0
  • Buffers: shared hit=53
7.          

SubPlan (for Index Only Scan)

8. 0.036 0.036 ↑ 1.2 5 1

Index Only Scan using test_pid_did on test test_4 (cost=0.57..2.61 rows=6 width=8) (actual time=0.035..0.036 rows=5 loops=1)

  • Index Cond: (parent_id = 106)
  • Filter: (draft_id = ANY ('{2,1}'::bigint[]))
  • Rows Removed by Filter: 22
  • Heap Fetches: 0
  • Buffers: shared hit=29