explain.depesz.com

PostgreSQL's explain analyze made readable

Result: t1gR

Settings
# exclusive inclusive rows x rows loops node
1. 303.386 3,756.496 ↑ 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,263.206..3,756.496 rows=494,137 loops=1)

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

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

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

HashAggregate (cost=35,321.88..41,261.43 rows=593,955 width=41) (actual time=518.597..683.430 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. 83.943 83.943 ↑ 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.009..83.943 rows=593,418 loops=1)

5. 55.117 2,369.896 ↑ 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,270.953..2,369.896 rows=494,138 loops=1)

6. 266.017 2,314.779 ↑ 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,270.941..2,314.779 rows=494,138 loops=1)

  • Sort Key: ar_receivable_applications_all.cash_receipt_id
  • Sort Method: quicksort Memory: 53124kB
7. 281.155 2,048.762 ↑ 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,524.349..2,048.762 rows=522,572 loops=1)

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

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

9. 287.713 575.030 ↑ 1.0 565,576 1

Sort (cost=95,435.12..96,888.96 rows=581,537 width=23) (actual time=521.020..575.030 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. 287.317 287.317 ↑ 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.010..287.317 rows=565,684 loops=1)

11. 297.382 1,086.899 ↓ 1.7 522,572 1

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

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

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

  • Group Key: ar_receivable_applications_all.cash_receipt_id, ar_receivable_applications_all.applied_customer_trx_id
13. 438.092 438.092 ↑ 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.008..438.092 rows=536,922 loops=1)

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