explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tMpV

Settings
# exclusive inclusive rows x rows loops node
1. 2,961.921 6,431.115 ↓ 2.8 14,413,335 1

Merge Join (cost=352,317.22..433,059.56 rows=5,147,236 width=52) (actual time=1,853.739..6,431.115 rows=14,413,335 loops=1)

  • Merge Cond: (pbn.assetid = ar.relatedassetid)
2. 1,297.079 1,970.614 ↓ 6.1 1,975,548 1

Sort (cost=178,865.31..179,670.29 rows=321,991 width=36) (actual time=1,316.592..1,970.614 rows=1,975,548 loops=1)

  • Sort Key: pbn.assetid
  • Sort Method: external merge Disk: 88824kB
3. 673.535 673.535 ↓ 6.1 1,975,548 1

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

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

Materialize (cost=173,258.30..177,887.31 rows=925,802 width=16) (actual time=482.012..1,498.580 rows=15,128,745 loops=1)

5. 459.556 632.778 ↑ 1.0 901,058 1

Sort (cost=173,258.30..175,572.80 rows=925,802 width=16) (actual time=482.009..632.778 rows=901,058 loops=1)

  • Sort Key: ar.relatedassetid
  • Sort Method: external merge Disk: 22864kB
6. 173.222 173.222 ↑ 1.0 901,123 1

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

  • Index Cond: (assetrelationshiptypeid = 7)
Planning time : 0.422 ms
Execution time : 7,066.187 ms