explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qtq9

Settings
# exclusive inclusive rows x rows loops node
1. 14.922 513.763 ↓ 12.0 12 1

GroupAggregate (cost=1,879.40..1,880.11 rows=1 width=36) (actual time=185.226..513.763 rows=12 loops=1)

  • Group Key: ar.relatedassetid
2. 120.383 498.841 ↓ 157,389.0 157,389 1

Nested Loop (cost=1,879.40..1,880.09 rows=1 width=12) (actual time=165.085..498.841 rows=157,389 loops=1)

  • Join Filter: (mm.assetid = aat.assetid)
3. 29.279 221.009 ↓ 157,449.0 157,449 1

Merge Join (cost=1,878.96..1,879.52 rows=1 width=20) (actual time=165.066..221.009 rows=157,449 loops=1)

  • Merge Cond: (ar.relatedassetid = mz.assetid)
4. 34.972 180.837 ↓ 2,463.4 96,074 1

Sort (cost=1,866.12..1,866.21 rows=39 width=20) (actual time=165.038..180.837 rows=96,074 loops=1)

  • Sort Key: ar.relatedassetid
  • Sort Method: quicksort Memory: 15194kB
5. 18.853 145.865 ↓ 3,398.3 132,535 1

Nested Loop (cost=0.56..1,865.09 rows=39 width=20) (actual time=0.023..145.865 rows=132,535 loops=1)

6. 22.046 22.046 ↓ 920.8 52,483 1

Seq Scan on modmeters mm (cost=0.00..1,767.19 rows=57 width=12) (actual time=0.012..22.046 rows=52,483 loops=1)

  • Filter: (assetdatatypeid = 430)
  • Rows Removed by Filter: 105001
7. 104.966 104.966 ↓ 3.0 3 52,483

Index Only Scan using assetrelationship_unique_constraint on assetrelationship ar (cost=0.56..1.71 rows=1 width=8) (actual time=0.002..0.002 rows=3 loops=52,483)

  • Index Cond: ((assetid = mm.assetid) AND (assetrelationshiptypeid = 11))
  • Heap Fetches: 2925
8. 10.878 10.893 ↓ 2,218.7 155,309 1

Sort (cost=12.85..13.02 rows=70 width=4) (actual time=0.025..10.893 rows=155,309 loops=1)

  • Sort Key: mz.assetid
  • Sort Method: quicksort Memory: 26kB
9. 0.015 0.015 ↑ 1.9 36 1

Seq Scan on modzones mz (cost=0.00..10.70 rows=70 width=4) (actual time=0.009..0.015 rows=36 loops=1)

10. 157.449 157.449 ↑ 1.0 1 157,449

Index Only Scan using assetassettype_unique_constraint on assetassettype aat (cost=0.44..0.56 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=157,449)

  • Index Cond: (assetid = ar.assetid)
  • Filter: (assettypeid = ANY ('{3515,3530}'::integer[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 372
Planning time : 0.585 ms
Execution time : 513.809 ms