explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IkOR

Settings
# exclusive inclusive rows x rows loops node
1. 14,422.012 89,041.208 ↑ 13.6 27,280,980 1

WindowAgg (cost=105,769,327.08..113,215,865.90 rows=372,326,941 width=257) (actual time=62,892.029..89,041.208 rows=27,280,980 loops=1)

2. 43,033.946 74,619.196 ↑ 13.6 27,280,980 1

Sort (cost=105,769,327.08..106,700,144.44 rows=372,326,941 width=225) (actual time=62,892.013..74,619.196 rows=27,280,980 loops=1)

  • Sort Key: plancomptablewithpool.pool_name, mouvementsjoinall.ecritures_id
  • Sort Method: external merge Disk: 2001616kB
3. 5,019.258 31,585.250 ↑ 13.6 27,280,980 1

Merge Right Join (cost=6,388,453.78..12,041,614.00 rows=372,326,941 width=225) (actual time=17,770.757..31,585.250 rows=27,280,980 loops=1)

  • Merge Cond: (plancomptablewithpool.no_compte = mouvementsjoinall.no_compte)
4. 0.002 0.838 ↓ 0.0 0 1

Sort (cost=23,943.34..23,957.67 rows=5,730 width=72) (actual time=0.838..0.838 rows=0 loops=1)

  • Sort Key: plancomptablewithpool.no_compte
  • Sort Method: quicksort Memory: 25kB
5. 0.000 0.836 ↓ 0.0 0 1

Subquery Scan on plancomptablewithpool (cost=23,342.14..23,585.67 rows=5,730 width=72) (actual time=0.836..0.836 rows=0 loops=1)

6. 0.002 0.836 ↓ 0.0 0 1

GroupAggregate (cost=23,342.14..23,528.37 rows=5,730 width=76) (actual time=0.836..0.836 rows=0 loops=1)

  • Group Key: plan_comptable.auto_id
7. 0.001 0.834 ↓ 0.0 0 1

Sort (cost=23,342.14..23,356.47 rows=5,730 width=125) (actual time=0.834..0.834 rows=0 loops=1)

  • Sort Key: plan_comptable.auto_id, pools.account_depth DESC
  • Sort Method: quicksort Memory: 25kB
8. 0.525 0.833 ↓ 0.0 0 1

Nested Loop (cost=0.00..22,984.47 rows=5,730 width=125) (actual time=0.833..0.833 rows=0 loops=1)

  • Join Filter: ((plan_comptable.no_compte)::text ~~ pools.normalized_number)
9. 0.308 0.308 ↑ 1.0 1,819 1

Seq Scan on plan_comptable (cost=0.00..47.19 rows=1,819 width=8) (actual time=0.007..0.308 rows=1,819 loops=1)

10. 0.000 0.000 ↓ 0.0 0 1,819

Materialize (cost=0.00..19.45 rows=630 width=58) (actual time=0.000..0.000 rows=0 loops=1,819)

11. 0.001 0.001 ↓ 0.0 0 1

Seq Scan on pools (cost=0.00..16.30 rows=630 width=58) (actual time=0.001..0.001 rows=0 loops=1)

12. 2,076.675 26,565.154 ↑ 1.0 27,280,980 1

Materialize (cost=6,364,510.44..6,500,965.34 rows=27,290,980 width=161) (actual time=17,769.915..26,565.154 rows=27,280,980 loops=1)

13. 18,012.380 24,488.479 ↑ 1.0 27,280,980 1

Sort (cost=6,364,510.44..6,432,737.89 rows=27,290,980 width=161) (actual time=17,769.913..24,488.479 rows=27,280,980 loops=1)

  • Sort Key: mouvementsjoinall.no_compte
  • Sort Method: external merge Disk: 2113680kB
14. 6,476.099 6,476.099 ↑ 1.0 27,280,980 1

Seq Scan on mouvementsjoinall (cost=0.00..755,096.80 rows=27,290,980 width=161) (actual time=0.007..6,476.099 rows=27,280,980 loops=1)

  • Filter: ((mouvements_autoid IS NOT NULL) AND (ecritures_id IS NOT NULL))
Planning time : 0.551 ms