explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6WeY

Settings
# exclusive inclusive rows x rows loops node
1. 1,185.024 712,821.081 ↑ 1.0 1 1

Aggregate (cost=45,386,988.78..45,386,988.79 rows=1 width=8) (actual time=712,821.081..712,821.081 rows=1 loops=1)

2.          

CTE order_lineitems

3. 577,186.624 690,731.750 ↑ 259.6 4,617,590 1

GroupAggregate (cost=12,005,006.82..18,417,703.53 rows=1,198,634,900 width=1,393) (actual time=103,215.711..690,731.750 rows=4,617,590 loops=1)

  • Group Key: o.id, o.order_details
4. 22,126.898 113,545.126 ↑ 3.3 3,650,995 1

Sort (cost=12,005,006.82..12,034,972.69 rows=11,986,349 width=1,321) (actual time=103,215.543..113,545.126 rows=3,650,995 loops=1)

  • Sort Key: o.id, o.order_details
  • Sort Method: external merge Disk: 4743616kB
5. 91,418.228 91,418.228 ↑ 3.3 3,650,995 1

Seq Scan on stg_order o (cost=0.00..3,671,962.49 rows=11,986,349 width=1,321) (actual time=3.543..91,418.228 rows=3,650,995 loops=1)

6. 711,636.057 711,636.057 ↑ 259.6 4,617,590 1

CTE Scan on order_lineitems (cost=0.00..23,972,698.00 rows=1,198,634,900 width=0) (actual time=103,215.715..711,636.057 rows=4,617,590 loops=1)

Planning time : 0.136 ms
Execution time : 714,524.212 ms