explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8J5Y

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 755.289 ↓ 5.0 10 1

Limit (cost=487.05..9,537.23 rows=2 width=23) (actual time=223.753..755.289 rows=10 loops=1)

2. 59.567 755.286 ↓ 5.0 10 1

Hash Join (cost=487.05..9,537.23 rows=2 width=23) (actual time=223.752..755.286 rows=10 loops=1)

  • Hash Cond: (alignments.customerid = customers.customerid)
3. 72.378 695.634 ↓ 10.6 835,674 1

Nested Loop (cost=1.27..8,754.51 rows=79,181 width=16) (actual time=2.391..695.634 rows=835,674 loops=1)

4. 1.707 2.635 ↓ 5.6 67 1

Nested Loop (cost=0.71..193.53 rows=12 width=8) (actual time=2.376..2.635 rows=67 loops=1)

  • Join Filter: (orgunits.orgunitlevelid = ol.orgunitlevelid)
  • Rows Removed by Join Filter: 11260
5. 0.186 0.928 ↓ 4.0 2,266 1

Nested Loop (cost=0.56..142.83 rows=566 width=16) (actual time=0.020..0.928 rows=2,266 loops=1)

6. 0.001 0.009 ↑ 1.0 1 1

Nested Loop (cost=0.28..102.81 rows=1 width=8) (actual time=0.009..0.009 rows=1 loops=1)

7. 0.004 0.004 ↑ 1.0 1 1

Seq Scan on userorgunitmapping uom (cost=0.00..94.50 rows=1 width=8) (actual time=0.004..0.004 rows=1 loops=1)

  • Filter: (userid = 5910)
8. 0.004 0.004 ↑ 1.0 1 1

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

  • Index Cond: (orgunitid = uom.orgunitid)
9. 0.733 0.733 ↓ 4.0 2,266 1

Index Scan using orgunits_treeright_idx on orgunits (cost=0.28..34.36 rows=566 width=24) (actual time=0.010..0.733 rows=2,266 loops=1)

  • Index Cond: (treeright <= orgunits_1.treeright)
  • Filter: (treeleft >= orgunits_1.treeleft)
10. 0.000 0.000 ↑ 1.0 5 2,266

Materialize (cost=0.14..8.26 rows=5 width=8) (actual time=0.000..0.000 rows=5 loops=2,266)

11. 0.005 0.005 ↑ 1.0 5 1

Index Scan using orgunitlevel_salesforceid_idx on orgunitlevel ol (cost=0.14..8.23 rows=5 width=8) (actual time=0.004..0.005 rows=5 loops=1)

  • Index Cond: (salesforceid = 313)
12. 620.621 620.621 ↑ 1.1 12,473 67

Index Scan using alignments_orgunitid_idx on alignments (cost=0.56..580.22 rows=13,320 width=24) (actual time=0.007..9.263 rows=12,473 loops=67)

  • Index Cond: (orgunitid = orgunits.orgunitid)
13. 0.007 0.085 ↑ 3.1 39 1

Hash (cost=484.25..484.25 rows=122 width=15) (actual time=0.085..0.085 rows=39 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
14. 0.056 0.078 ↑ 3.1 39 1

Bitmap Heap Scan on customers (cost=5.38..484.25 rows=122 width=15) (actual time=0.030..0.078 rows=39 loops=1)

  • Recheck Cond: (lastname = 'NIGAM'::text)
  • Filter: (customertypeid = 1)
  • Heap Blocks: exact=38
15. 0.022 0.022 ↑ 3.1 39 1

Bitmap Index Scan on customers_lastname_idx (cost=0.00..5.34 rows=122 width=0) (actual time=0.022..0.022 rows=39 loops=1)

  • Index Cond: (lastname = 'NIGAM'::text)
Planning time : 1.137 ms