explain.depesz.com

PostgreSQL's explain analyze made readable

Result: q1Pg : Optimization for: Check it out; plan #vmv

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Gather Motion 32:1 (slice1; segments: 32) (cost=333.43..426.93 rows=4 width=908) (actual rows= loops=)

  • Rows out: 416897909 rows at destination with 116082 ms to first row, 276765 ms to end, start offset by 289 ms.
  • (slice0) Executor memory: 421K bytes.
  • (slice1) * Executor memory: 277174K bytes avg x 32 workers, 277174K bytes max (seg0). Work_mem: 276722K bytes max, 7777885K bytes wanted.
  • Memory used: 419431K bytes
  • Memory wanted: 15556068K bytes
2. 0.000 0.000 ↓ 0.0

Subquery Scan recent_run (cost=333.43..426.93 rows=1 width=908) (actual rows= loops=)

  • Filter: rank = 1
  • Rows out: Avg 13028059.7 rows x 32 workers. Max 13029631 rows (seg10) with 133825 ms to first row, 272409 ms to end, start offset by 295 ms.
3. 0.000 0.000 ↓ 0.0

Window (cost=333.43..384.43 rows=107 width=908) (actual rows= loops=)

  • Partition By: temp_xyz_time.unique_part_id, temp_xyz_time.section, temp_xyz_time.num
  • Order By: temp_xyz_time.date_time_stamp, temp_xyz_time.create_datetime
  • Rows out: Avg 20415132.5 rows x 32 workers. Max 20419589 rows (seg7) with 130228 ms to first row, 263437 ms to end, start offset by 296 ms.
4. 0.000 0.000 ↓ 0.0

Sort (cost=333.43..341.93 rows=107 width=908) (actual rows= loops=)

  • Sort Key: temp_xyz_time.unique_part_id, temp_xyz_time.section, temp_xyz_time.num, temp_xyz_time.date_time_stamp, temp_xyz_time.create_datetime
  • Rows out: Avg 20415132.5 rows x 32 workers. Max 20419589 rows (seg7) with 130228 ms to first row, 222910 ms to end, start offset by 296 ms.
  • Executor memory: 276722K bytes avg, 276722K bytes max (seg0).
  • Work_mem used: 276722K bytes avg, 276722K bytes max (seg0). Workfile: (32 spilling)
  • Work_mem wanted: 7776020K bytes avg, 7777885K bytes max (seg7) to lessen workfile I/O affecting 32 workers.
5. 0.000 0.000 ↓ 0.0

Seq Scan on temp_xyz_time (cost=0.00..134.00 rows=107 width=908) (actual rows= loops=)

  • Rows out: Avg 20415132.5 rows x 32 workers. Max 20419589 rows (seg7) with 0.916 ms to first row, 3738 ms to end, start offset by 297 ms.