explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ef1T

Settings
# exclusive inclusive rows x rows loops node
1. 7,464.834 62,504.143 ↓ 132.0 1,479,356 1

GroupAggregate (cost=1,196,663.28..1,197,223.58 rows=11,206 width=248) (actual time=51,754.648..62,504.143 rows=1,479,356 loops=1)

  • Group Key: se.sale_number, se.contract_family_id, se.claimant_company_id, xee.contract_item_id, xee.sale_id, se.currency_conversion_ind
  • Buffers: shared hit=50073 read=655104, local read=7, temp read=494033 written=494073
2. 13,517.887 55,039.309 ↓ 253.6 2,842,114 1

Sort (cost=1,196,663.28..1,196,691.3 rows=11,206 width=107) (actual time=51,754.596..55,039.309 rows=2,842,114 loops=1)

  • Sort Key: se.sale_number, se.contract_family_id, se.claimant_company_id, xee.contract_item_id, xee.sale_id, se.currency_conversion_ind
  • Sort Method: external merge Disk: 331856kB
  • Buffers: shared hit=50073 read=655104, local read=7, temp read=494033 written=494073
3. 1,014.624 41,521.422 ↓ 253.6 2,842,114 1

Hash Join (cost=972,850.45..1,195,909.57 rows=11,206 width=107) (actual time=36,635.987..41,521.422 rows=2,842,114 loops=1)

  • Buffers: shared hit=50068 read=655104, local read=7, temp read=429277 written=429253
4. 1,999.195 40,505.754 ↓ 296.4 3,321,081 1

Gather (cost=972,814.56..1,195,719.59 rows=11,206 width=123) (actual time=36,634.929..40,505.754 rows=3,321,081 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=50068 read=655104, temp read=429277 written=429253
5. 1,960.705 38,506.559 ↓ 237.1 1,107,027 3 / 3

Hash Join (cost=971,814.56..1,193,598.99 rows=4,669 width=123) (actual time=36,054.464..38,506.559 rows=1,107,027 loops=3)

  • Buffers: shared hit=50068 read=655104, temp read=429277 written=429253
6. 494.001 494.001 ↑ 1.3 1,107,027 3 / 3

Seq Scan on sale_earning se (cost=0..173,762.38 rows=1,435,438 width=75) (actual time=0.12..494.001 rows=1,107,027 loops=3)

  • Buffers: shared hit=581 read=158827
7. 1,337.819 36,051.853 ↓ 5.6 1,943,188 3 / 3

Hash (cost=962,608.99..962,608.99 rows=344,505 width=70) (actual time=36,051.853..36,051.853 rows=1,943,188 loops=3)

  • Buffers: shared hit=49395 read=496277, temp read=309402 written=369534
8. 396.357 34,714.034 ↓ 5.6 1,943,188 3 / 3

Subquery Scan on xee (cost=933,326.06..962,608.99 rows=344,505 width=70) (actual time=30,373.925..34,714.034 rows=1,943,188 loops=3)

  • Buffers: shared hit=49395 read=496277, temp read=309402 written=309564
9. 598.616 34,317.677 ↓ 5.6 1,943,188 3 / 3

Unique (cost=933,326.06..959,163.94 rows=344,505 width=86) (actual time=30,373.922..34,317.677 rows=1,943,188 loops=3)

  • Buffers: shared hit=49395 read=496277, temp read=309402 written=309564
10. 18,684.623 33,719.061 ↑ 1.0 3,321,081 3 / 3

Sort (cost=933,326.06..941,938.68 rows=3,445,051 width=86) (actual time=30,373.92..33,719.061 rows=3,321,081 loops=3)

  • 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=49395 read=496277, temp read=309402 written=309564
11. 8,888.377 15,034.438 ↑ 1.0 3,321,081 3 / 3

Hash Join (cost=43,419.85..347,306.3 rows=3,445,051 width=86) (actual time=4,702.77..15,034.438 rows=3,321,081 loops=3)

  • Buffers: shared hit=49342 read=496277, temp read=117834 written=117792
12. 1,444.345 1,444.345 ↑ 1.0 3,321,081 3 / 3

Seq Scan on sale_earning xee_1 (cost=0..193,858.51 rows=3,445,051 width=78) (actual time=0.013..1,444.345 rows=3,321,081 loops=3)

  • Buffers: shared hit=4338 read=473886
13. 427.816 4,701.716 ↓ 1.0 716,770 3 / 3

Hash (cost=29,561.6..29,561.6 rows=716,660 width=30) (actual time=4,701.716..4,701.716 rows=716,770 loops=3)

  • Buffers: shared hit=44794 read=22391, temp written=11487
14. 4,273.900 4,273.900 ↓ 1.0 716,770 3 / 3

Seq Scan on sale s (cost=0..29,561.6 rows=716,660 width=30) (actual time=0.02..4,273.9 rows=716,770 loops=3)

  • Buffers: shared hit=44794 read=22391
15. 0.426 1.044 ↑ 1.0 1,284 1

Hash (cost=19.84..19.84 rows=1,284 width=16) (actual time=1.043..1.044 rows=1,284 loops=1)

  • Buffers: local read=7
16. 0.618 0.618 ↑ 1.0 1,284 1

Seq Scan on _contract_family xcf (cost=0..19.84 rows=1,284 width=16) (actual time=0.275..0.618 rows=1,284 loops=1)

  • Buffers: local read=7
Planning time : 15.413 ms
Execution time : 62,721.639 ms