explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4vgd

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.046 ↓ 0.0 0 1

Group (cost=68.32..68.33 rows=1 width=8) (actual time=0.046..0.046 rows=0 loops=1)

  • Group Key: alignments.customerid
2. 0.011 0.045 ↓ 0.0 0 1

Sort (cost=68.32..68.33 rows=1 width=8) (actual time=0.045..0.045 rows=0 loops=1)

  • Sort Key: alignments.customerid
  • Sort Method: quicksort Memory: 25kB
3. 0.001 0.034 ↓ 0.0 0 1

Nested Loop (cost=6.29..68.31 rows=1 width=8) (actual time=0.034..0.034 rows=0 loops=1)

4. 0.001 0.033 ↓ 0.0 0 1

Nested Loop (cost=6.02..67.68 rows=2 width=24) (actual time=0.033..0.033 rows=0 loops=1)

  • Join Filter: ((orgunits.treeleft >= orgunits_1.treeleft) AND (orgunits.treeright <= orgunits_1.treeright))
5. 0.002 0.023 ↑ 1.0 1 1

Nested Loop (cost=0.56..16.61 rows=1 width=8) (actual time=0.022..0.023 rows=1 loops=1)

6. 0.013 0.013 ↑ 1.0 1 1

Index Scan using userorgunitmapping_userid_idx on userorgunitmapping uom (cost=0.28..8.30 rows=1 width=8) (actual time=0.013..0.013 rows=1 loops=1)

  • Index Cond: (userid = 8795)
7. 0.008 0.008 ↑ 1.0 1 1

Index Scan using orgunits_orgunitid_orgunitlevelid on orgunits orgunits_1 (cost=0.28..8.30 rows=1 width=16) (actual time=0.007..0.008 rows=1 loops=1)

  • Index Cond: (orgunitid = uom.orgunitid)
8. 0.000 0.009 ↓ 0.0 0 1

Nested Loop (cost=5.45..50.86 rows=14 width=32) (actual time=0.009..0.009 rows=0 loops=1)

9. 0.002 0.009 ↓ 0.0 0 1

Nested Loop (cost=5.17..46.51 rows=14 width=24) (actual time=0.009..0.009 rows=0 loops=1)

10. 0.000 0.007 ↓ 0.0 0 1

Nested Loop (cost=4.60..36.65 rows=2 width=16) (actual time=0.007..0.007 rows=0 loops=1)

11. 0.004 0.008 ↓ 0.0 0 1

Bitmap Heap Scan on customerassociations ca (cost=4.17..11.28 rows=3 width=8) (actual time=0.007..0.008 rows=0 loops=1)

  • Recheck Cond: (childcustomerid = 24877704)
12. 0.004 0.004 ↓ 0.0 0 1

Bitmap Index Scan on temp_child_parent_association_idx (cost=0.00..4.17 rows=3 width=0) (actual time=0.004..0.004 rows=0 loops=1)

  • Index Cond: (childcustomerid = 24877704)
13. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_customers_customerid on customers c (cost=0.43..8.45 rows=1 width=8) (never executed)

  • Index Cond: (customerid = ca.parentcustomerid)
  • Filter: ((NOT is_pdrp_enabled) OR (is_pdrp_enabled IS NULL))
14. 0.000 0.000 ↓ 0.0 0

Index Scan using alignments_customerid_idx on alignments (cost=0.56..4.82 rows=11 width=24) (never executed)

  • Index Cond: (customerid = c.customerid)
  • Filter: (salesforceid = 313)
15. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_orgunits_orgunitid on orgunits (cost=0.28..0.30 rows=1 width=24) (never executed)

  • Index Cond: (orgunitid = alignments.orgunitid)
16. 0.000 0.000 ↓ 0.0 0

Index Scan using pk_orgunitlevel_orgunitlevelid on orgunitlevel ol (cost=0.27..0.31 rows=1 width=16) (never executed)

  • Index Cond: (orgunitlevelid = orgunits.orgunitlevelid)
  • Filter: (salesforceid = 313)
Planning time : 4.331 ms