explain.depesz.com

PostgreSQL's explain analyze made readable

Result: fkz

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 71.068 ↑ 1.0 10 1

Limit (cost=10.14..4,198.20 rows=10 width=23) (actual time=8.458..71.068 rows=10 loops=1)

2. 3.822 71.065 ↑ 7,126.6 10 1

Nested Loop (cost=10.14..29,846,621.67 rows=71,266 width=23) (actual time=8.457..71.065 rows=10 loops=1)

  • Join Filter: (alignments.orgunitid = orgunits.orgunitid)
  • Rows Removed by Join Filter: 49991
3. 0.049 62.665 ↑ 92,972.9 327 1

Nested Loop (cost=0.99..24,374,171.80 rows=30,402,126 width=31) (actual time=6.130..62.665 rows=327 loops=1)

4. 0.141 0.141 ↑ 81,671.5 51 1

Index Scan using customers_lastname_idx on customers (cost=0.43..668,067.76 rows=4,165,245 width=15) (actual time=0.011..0.141 rows=51 loops=1)

  • Filter: (customertypeid = 1)
5. 62.475 62.475 ↑ 28.5 6 51

Index Scan using alignments_customerid_idx on alignments (cost=0.56..3.98 rows=171 width=24) (actual time=1.223..1.225 rows=6 loops=51)

  • Index Cond: (customerid = customers.customerid)
6. 2.302 4.578 ↓ 12.8 153 327

Materialize (cost=9.14..67.23 rows=12 width=8) (actual time=0.003..0.014 rows=153 loops=327)

7. 0.380 2.276 ↓ 12.8 153 1

Hash Join (cost=9.14..67.17 rows=12 width=8) (actual time=1.016..2.276 rows=153 loops=1)

  • Hash Cond: (orgunits.orgunitlevelid = ol.orgunitlevelid)
8. 0.418 1.888 ↓ 8.9 5,013 1

Nested Loop (cost=0.85..56.63 rows=566 width=16) (actual time=0.042..1.888 rows=5,013 loops=1)

9. 0.004 0.019 ↑ 1.0 1 1

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

10. 0.010 0.010 ↑ 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.009..0.010 rows=1 loops=1)

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

  • Index Cond: (orgunitid = uom.orgunitid)
12. 1.451 1.451 ↓ 8.9 5,013 1

Index Scan using orgunits_treeright_idx on orgunits (cost=0.28..34.36 rows=566 width=24) (actual time=0.023..1.451 rows=5,013 loops=1)

  • Index Cond: (treeright <= orgunits_1.treeright)
  • Filter: (treeleft >= orgunits_1.treeleft)
13. 0.003 0.008 ↑ 1.0 5 1

Hash (cost=8.23..8.23 rows=5 width=8) (actual time=0.008..0.008 rows=5 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
14. 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)
Planning time : 1.213 ms