explain.depesz.com

PostgreSQL's explain analyze made readable

Result: STmG

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.964 ↓ 0.0 0 1

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

  • Group Key: alignments.customerid
2. 0.006 0.964 ↓ 0.0 0 1

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

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

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

4. 0.001 0.957 ↓ 0.0 0 1

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

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

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

6. 0.940 0.940 ↑ 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.939..0.940 rows=1 loops=1)

  • Index Cond: (userid = 8795)
7. 0.005 0.005 ↑ 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.005..0.005 rows=1 loops=1)

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

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

9. 0.000 0.008 ↓ 0.0 0 1

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

10. 0.001 0.008 ↓ 0.0 0 1

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

11. 0.002 0.007 ↓ 0.0 0 1

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

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

Bitmap Index Scan on customerassociations_childcustomerid_idx (cost=0.00..4.17 rows=3 width=0) (actual time=0.005..0.005 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 : 2.533 ms