explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wWzS : TEst Reuse 2

Settings
# exclusive inclusive rows x rows loops node
1. 2,433.858 55,287.819 ↓ 2.7 5,500,002 1

Unique (cost=7,488,103.34..7,588,103.36 rows=2,008,528 width=114) (actual time=50,880.145..55,287.819 rows=5,500,002 loops=1)

2. 9,523.801 52,853.961 ↑ 1.0 10,000,002 1

Sort (cost=7,488,103.34..7,513,103.35 rows=10,000,002 width=114) (actual time=50,880.143..52,853.961 rows=10,000,002 loops=1)

  • Sort Key: perf_entity_id, (first_value(b_pubid) OVER (?)), (first_value(b_pubid) OVER (?))
  • Sort Method: external merge Disk: 409,880kB
3. 6,646.966 43,330.160 ↑ 1.0 10,000,002 1

WindowAgg (cost=4,254,717.22..4,479,717.26 rows=10,000,002 width=114) (actual time=34,624.953..43,330.160 rows=10,000,002 loops=1)

4. 12,410.347 36,683.194 ↑ 1.0 10,000,002 1

Sort (cost=4,254,717.22..4,279,717.22 rows=10,000,002 width=50) (actual time=34,624.928..36,683.194 rows=10,000,002 loops=1)

  • Sort Key: perf_entity_id, b_pubid, b_sourceid
  • Sort Method: external merge Disk: 331,608kB
5. 5,378.417 24,272.847 ↑ 1.0 10,000,002 1

WindowAgg (cost=2,233,443.10..2,408,443.14 rows=10,000,002 width=50) (actual time=16,637.633..24,272.847 rows=10,000,002 loops=1)

6. 9,251.530 18,894.430 ↑ 1.0 10,000,002 1

Sort (cost=2,233,443.10..2,258,443.11 rows=10,000,002 width=18) (actual time=16,637.613..18,894.430 rows=10,000,002 loops=1)

  • Sort Key: perf_entity_id
  • Sort Method: external merge Disk: 292,512kB
7. 9,642.900 9,642.900 ↑ 1.0 10,000,002 1

Seq Scan on mi_perf_entity s2 (cost=0.00..660,610.02 rows=10,000,002 width=18) (actual time=0.024..9,642.900 rows=10,000,002 loops=1)

Planning time : 0.170 ms
Execution time : 55,887.220 ms