explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Agp : TEst Reuse 1

Settings
# exclusive inclusive rows x rows loops node
1. 2,666.898 75,896.709 ↓ 2.7 5,500,002 1

Unique (cost=10,286,327.96..10,411,327.99 rows=2,008,528 width=114) (actual time=71,215.667..75,896.709 rows=5,500,002 loops=1)

2. 10,502.694 73,229.811 ↑ 1.0 10,000,002 1

Sort (cost=10,286,327.96..10,311,327.97 rows=10,000,002 width=114) (actual time=71,215.665..73,229.811 rows=10,000,002 loops=1)

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

WindowAgg (cost=7,052,941.84..7,277,941.88 rows=10,000,002 width=114) (actual time=53,361.209..62,727.117 rows=10,000,002 loops=1)

4. 13,616.766 55,944.597 ↑ 1.0 10,000,002 1

Sort (cost=7,052,941.84..7,077,941.84 rows=10,000,002 width=82) (actual time=53,361.185..55,944.597 rows=10,000,002 loops=1)

  • Sort Key: perf_entity_id, b_pubid, b_sourceid
  • Sort Method: external merge Disk: 370,760kB
5. 6,699.217 42,327.831 ↑ 1.0 10,000,002 1

WindowAgg (cost=4,254,717.22..4,454,717.26 rows=10,000,002 width=82) (actual time=33,507.068..42,327.831 rows=10,000,002 loops=1)

6. 8,619.424 35,628.614 ↑ 1.0 10,000,002 1

Sort (cost=4,254,717.22..4,279,717.22 rows=10,000,002 width=50) (actual time=33,507.041..35,628.614 rows=10,000,002 loops=1)

  • Sort Key: perf_entity_id, b_pubid
  • Sort Method: external merge Disk: 331,608kB
7. 5,431.964 27,009.190 ↑ 1.0 10,000,002 1

WindowAgg (cost=2,233,443.10..2,408,443.14 rows=10,000,002 width=50) (actual time=19,312.548..27,009.190 rows=10,000,002 loops=1)

8. 9,373.533 21,577.226 ↑ 1.0 10,000,002 1

Sort (cost=2,233,443.10..2,258,443.11 rows=10,000,002 width=18) (actual time=19,312.525..21,577.226 rows=10,000,002 loops=1)

  • Sort Key: perf_entity_id
  • Sort Method: external merge Disk: 292,512kB
9. 12,203.693 12,203.693 ↑ 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.035..12,203.693 rows=10,000,002 loops=1)

Planning time : 15.661 ms
Execution time : 76,533.457 ms