explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6g1k

Settings
# exclusive inclusive rows x rows loops node
1. 2,188.322 6,831.139 ↑ 3.6 4,166 1

HashAggregate (cost=456,942.54..457,091.25 rows=14,871 width=12) (actual time=6,830.311..6,831.139 rows=4,166 loops=1)

  • Group Key: pbn.brokenlinkassetid
2. 1,938.334 4,642.817 ↓ 2.8 14,413,335 1

Merge Join (cost=350,464.02..431,206.36 rows=5,147,236 width=8) (actual time=1,486.221..4,642.817 rows=14,413,335 loops=1)

  • Merge Cond: (pbn.assetid = ar.relatedassetid)
3. 920.421 1,449.480 ↓ 6.1 1,975,548 1

Sort (cost=178,865.31..179,670.29 rows=321,991 width=8) (actual time=1,011.482..1,449.480 rows=1,975,548 loops=1)

  • Sort Key: pbn.assetid
  • Sort Method: external merge Disk: 34680kB
4. 529.059 529.059 ↓ 6.1 1,975,548 1

Index Scan using pipebreaknode_idx on pipebreaknode pbn (cost=0.57..149,408.51 rows=321,991 width=8) (actual time=0.015..529.059 rows=1,975,548 loops=1)

  • Index Cond: (scenarioid = 5196)
  • Filter: ((minpressure < '15'::double precision) AND (pipebreaknodetype = 2))
5. 719.929 1,255.003 ↓ 16.3 15,128,745 1

Materialize (cost=171,405.10..176,034.11 rows=925,802 width=4) (actual time=429.193..1,255.003 rows=15,128,745 loops=1)

6. 368.346 535.074 ↑ 1.0 901,058 1

Sort (cost=171,405.10..173,719.60 rows=925,802 width=4) (actual time=429.191..535.074 rows=901,058 loops=1)

  • Sort Key: ar.relatedassetid
  • Sort Method: external merge Disk: 12320kB
7. 166.728 166.728 ↑ 1.0 901,123 1

Index Scan using assetrelationship_idx2 on assetrelationship ar (cost=0.56..72,241.68 rows=925,802 width=4) (actual time=0.022..166.728 rows=901,123 loops=1)

  • Index Cond: (assetrelationshiptypeid = 7)
Planning time : 0.294 ms
Execution time : 6,838.089 ms