explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Aywt

Settings
# exclusive inclusive rows x rows loops node
1. 331.082 3,844.075 ↑ 5,467,483.1 494,137 1

Merge Join (cost=174,225,852.12..40,701,788,747.72 rows=2,701,685,706,278 width=76) (actual time=3,306.797..3,844.075 rows=494,137 loops=1)

  • Merge Cond: (ar_cash_receipts_all.cash_receipt_id = ar_receivable_applications_all.cash_receipt_id)
2. 396.195 1,086.212 ↑ 1.0 593,418 1

Sort (cost=104,161.24..105,646.13 rows=593,955 width=41) (actual time=989.705..1,086.212 rows=593,418 loops=1)

  • Sort Key: ar_cash_receipts_all.cash_receipt_id
  • Sort Method: quicksort Memory: 70989kB
3. 605.640 690.017 ↑ 1.0 593,418 1

HashAggregate (cost=35,321.88..41,261.43 rows=593,955 width=41) (actual time=521.836..690.017 rows=593,418 loops=1)

  • Group Key: ar_cash_receipts_all.receipt_number, ar_cash_receipts_all.cash_receipt_id, ar_cash_receipts_all.amount, ar_cash_receipts_all.currency_code, ar_cash_receipts_all.receipt_date, ar_cash_receipts_all.remittance_bank_account_id
4. 84.377 84.377 ↑ 1.0 593,418 1

Seq Scan on ar_cash_receipts_all (cost=0.00..26,412.55 rows=593,955 width=41) (actual time=0.006..84.377 rows=593,418 loops=1)

5. 60.859 2,426.781 ↑ 1,841.0 494,138 1

Materialize (cost=174,121,690.88..178,670,327.91 rows=909,727,406 width=35) (actual time=2,317.075..2,426.781 rows=494,138 loops=1)

6. 275.347 2,365.922 ↑ 1,841.0 494,138 1

Sort (cost=174,121,690.88..176,396,009.40 rows=909,727,406 width=35) (actual time=2,317.063..2,365.922 rows=494,138 loops=1)

  • Sort Key: ar_receivable_applications_all.cash_receipt_id
  • Sort Method: quicksort Memory: 53124kB
7. 276.570 2,090.575 ↑ 1,740.9 522,572 1

Merge Join (cost=215,988.58..13,874,984.25 rows=909,727,406 width=35) (actual time=1,573.463..2,090.575 rows=522,572 loops=1)

  • Merge Cond: (ra_customer_trx_all.customer_trx_id = ar_receivable_applications_all.applied_customer_trx_id)
8. 103.976 682.757 ↑ 1.0 565,576 1

Unique (cost=95,435.12..101,250.49 rows=581,537 width=23) (actual time=525.746..682.757 rows=565,576 loops=1)

9. 285.153 578.781 ↑ 1.0 565,576 1

Sort (cost=95,435.12..96,888.96 rows=581,537 width=23) (actual time=525.743..578.781 rows=565,576 loops=1)

  • Sort Key: ra_customer_trx_all.customer_trx_id, ra_customer_trx_all.trx_number, ra_customer_trx_all.interface_header_attribute1
  • Sort Method: quicksort Memory: 67557kB
10. 293.628 293.628 ↑ 1.0 565,684 1

Seq Scan on ra_customer_trx_all (cost=0.00..39,754.37 rows=581,537 width=23) (actual time=0.011..293.628 rows=565,684 loops=1)

11. 313.858 1,131.248 ↓ 1.7 522,572 1

Sort (cost=120,553.46..121,335.64 rows=312,870 width=12) (actual time=1,047.531..1,131.248 rows=522,572 loops=1)

  • Sort Key: ar_receivable_applications_all.applied_customer_trx_id
  • Sort Method: quicksort Memory: 36784kB
12. 363.708 817.390 ↓ 1.7 522,572 1

HashAggregate (cost=85,738.53..88,867.23 rows=312,870 width=12) (actual time=695.000..817.390 rows=522,572 loops=1)

  • Group Key: ar_receivable_applications_all.cash_receipt_id, ar_receivable_applications_all.applied_customer_trx_id
13. 453.682 453.682 ↑ 1.0 536,922 1

Seq Scan on ar_receivable_applications_all (cost=0.00..82,978.61 rows=551,984 width=12) (actual time=0.009..453.682 rows=536,922 loops=1)

  • Filter: ((status)::text = 'APP'::text)
  • Rows Removed by Filter: 1196119
Planning time : 0.284 ms
Execution time : 3,900.485 ms