explain.depesz.com

PostgreSQL's explain analyze made readable

Result: S2Qw

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 728.552 ↓ 5.0 10 1

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

2. 58.771 728.545 ↓ 5.0 10 1

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

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

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

4. 1.640 2.598 ↓ 5.6 67 1

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

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

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

6. 0.002 0.011 ↑ 1.0 1 1

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

7. 0.005 0.005 ↑ 1.0 1 1

Seq Scan on userorgunitmapping uom (cost=0.00..94.50 rows=1 width=8) (actual time=0.005..0.005 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.746 0.746 ↓ 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.746 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. 595.831 595.831 ↑ 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..8.893 rows=12,473 loops=67)

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

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

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

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

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

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

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