explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8slF

Settings
# exclusive inclusive rows x rows loops node
1. 1,076.907 456,291.943 ↑ 1.0 1 1

Aggregate (cost=13,576,332.84..13,576,332.85 rows=1 width=8) (actual time=456,291.943..456,291.943 rows=1 loops=1)

2.          

CTE order_lineitems

3. 403,575.515 436,582.459 ↑ 79.1 4,642,702 1

GroupAggregate (cost=3,354,566.84..5,318,173.59 rows=367,029,300 width=1,392) (actual time=20,072.707..436,582.459 rows=4,642,702 loops=1)

  • Group Key: o.id, o.order_details
4. 31,303.169 33,006.944 ↑ 1.0 3,669,289 1

Sort (cost=3,354,566.84..3,363,742.57 rows=3,670,293 width=1,320) (actual time=20,072.555..33,006.944 rows=3,669,289 loops=1)

  • Sort Key: o.id, o.order_details
  • Sort Method: external merge Disk: 4767256kB
5. 1,703.775 1,703.775 ↑ 1.0 3,669,289 1

Seq Scan on stg_order o (cost=0.00..846,814.93 rows=3,670,293 width=1,320) (actual time=0.005..1,703.775 rows=3,669,289 loops=1)

6. 455,215.036 455,215.036 ↑ 79.1 4,642,702 1

CTE Scan on order_lineitems (cost=0.00..7,340,586.00 rows=367,029,300 width=0) (actual time=20,072.712..455,215.036 rows=4,642,702 loops=1)

Planning time : 0.120 ms
Execution time : 457,571.047 ms