explain.depesz.com

PostgreSQL's explain analyze made readable

Result: x3au

Settings
# exclusive inclusive rows x rows loops node
1. 12,571.380 48,579.483 ↓ 0.0 0 1

Update on _existing_earnings (cost=975,843.61..1,069,780.44 rows=6,230,181 width=374) (actual time=48,579.483..48,579.483 rows=0 loops=1)

  • Buffers: shared hit=13 read=181799, local hit=2054403 read=1032392 dirtied=1032391 written=1032385, temp read=186471 written=186399
2. 3,921.817 36,008.103 ↑ 4.2 1,479,356 1

Hash Join (cost=975,843.61..1,069,780.44 rows=6,230,181 width=374) (actual time=30,515.701..36,008.103 rows=1,479,356 loops=1)

  • Buffers: shared hit=13 read=181799, local read=26792 dirtied=26792 written=26785, temp read=186471 written=186399
3. 1,618.140 1,618.140 ↓ 2.0 1,479,356 1

Seq Scan on _existing_earnings _existing_earnings (cost=0..34,025.84 rows=723,384 width=248) (actual time=0.343..1,618.14 rows=1,479,356 loops=1)

  • Buffers: local read=26792 dirtied=26792 written=26785
4. 1,380.160 30,468.146 ↓ 5.6 1,943,188 1

Hash (cost=962,601.08..962,601.08 rows=344,502 width=164) (actual time=30,468.146..30,468.146 rows=1,943,188 loops=1)

  • Buffers: shared hit=13 read=181799, temp read=103134 written=144046
5. 1,110.367 29,087.986 ↓ 5.6 1,943,188 1

Subquery Scan on xee (cost=933,318.39..962,601.08 rows=344,502 width=164) (actual time=23,222.033..29,087.986 rows=1,943,188 loops=1)

  • Buffers: shared hit=13 read=181799, temp read=103134 written=103188
6. 738.946 27,977.619 ↓ 5.6 1,943,188 1

Unique (cost=933,318.39..959,156.06 rows=344,502 width=86) (actual time=23,222.02..27,977.619 rows=1,943,188 loops=1)

  • Buffers: shared hit=13 read=181799, temp read=103134 written=103188
7. 18,415.721 27,238.673 ↑ 1.0 3,321,081 1

Sort (cost=933,318.39..941,930.94 rows=3,445,023 width=86) (actual time=23,222.017..27,238.673 rows=3,321,081 loops=1)

  • Sort Key: xee_1.sale_number, xee_1.contract_family_id, xee_1.created DESC, (lower(s.active_range)) DESC
  • Sort Method: external merge Disk: 321536kB
  • Buffers: shared hit=13 read=181799, temp read=103134 written=103188
8. 3,788.332 8,822.952 ↑ 1.0 3,321,081 1

Hash Join (cost=43,420.35..347,306.37 rows=3,445,023 width=86) (actual time=2,698.437..8,822.952 rows=3,321,081 loops=1)

  • Buffers: shared hit=4 read=181799, temp read=39278 written=39264
9. 2,336.808 2,336.808 ↑ 1.0 3,321,081 1

Seq Scan on sale_earning xee_1 (cost=0..193,858.23 rows=3,445,023 width=78) (actual time=0.224..2,336.808 rows=3,321,081 loops=1)

  • Buffers: shared hit=2 read=159406
10. 338.721 2,697.812 ↓ 1.0 716,770 1

Hash (cost=29,561.82..29,561.82 rows=716,682 width=30) (actual time=2,697.812..2,697.812 rows=716,770 loops=1)

  • Buffers: shared hit=2 read=22393, temp written=3829
11. 2,359.091 2,359.091 ↓ 1.0 716,770 1

Seq Scan on sale s (cost=0..29,561.82 rows=716,682 width=30) (actual time=0.016..2,359.091 rows=716,770 loops=1)

  • Buffers: shared hit=2 read=22393
Planning time : 144.925 ms
Execution time : 48,679.526 ms