explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UtgE

Settings
# exclusive inclusive rows x rows loops node
1. 12,585.447 12,634.849 ↓ 0.0 0 1

CTE Scan on current_agreement (cost=643,219.25..682,154.15 rows=865,220 width=731) (actual time=12,634.849..12,634.849 rows=0 loops=1)

  • Filter: (NOT (hashed SubPlan 2))
  • Rows Removed by Filter: 2,351,363
2.          

CTE current_agreement

3. 1,740.980 11,025.041 ↓ 1.4 2,351,363 1

Unique (cost=621,693.42..640,884.16 rows=1,730,440 width=77) (actual time=5,988.059..11,025.041 rows=2,351,363 loops=1)

4. 8,125.418 9,284.061 ↓ 1.0 3,906,436 1

Sort (cost=621,693.42..631,288.79 rows=3,838,149 width=77) (actual time=5,988.057..9,284.061 rows=3,906,436 loops=1)

  • Sort Key: products_electricityagreement.account_id, products_electricityagreement.valid_from DESC
  • Sort Method: external merge Disk: 329,632kB
5. 1,158.643 1,158.643 ↓ 1.0 3,906,436 1

Seq Scan on products_electricityagreement (cost=0.00..102,063.49 rows=3,838,149 width=77) (actual time=0.007..1,158.643 rows=3,906,436 loops=1)

6.          

SubPlan (for CTE Scan)

7. 1.104 49.402 ↓ 1.1 2,096 1

Unique (cost=0.29..2,330.47 rows=1,848 width=4) (actual time=0.096..49.402 rows=2,096 loops=1)

8. 48.298 48.298 ↑ 1.1 2,119 1

Index Scan using support_complaint_8a089c2a on support_complaint (cost=0.29..2,324.90 rows=2,227 width=4) (actual time=0.095..48.298 rows=2,119 loops=1)

  • Filter: ((status)::text <> 'RESOLVED'::text)
  • Rows Removed by Filter: 58,120
Planning time : 0.184 ms
Execution time : 12,720.499 ms