explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LK2a

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 202.347 ↑ 20.0 3 1

Finalize GroupAggregate (cost=21,628.99..21,645.99 rows=60 width=298) (actual time=202.340..202.347 rows=3 loops=1)

  • Group Key: organisations.name, payment_methods.organisation_id
2. 33.148 217.672 ↑ 13.3 9 1

Gather Merge (cost=21,628.99..21,642.99 rows=120 width=298) (actual time=202.329..217.672 rows=9 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.041 184.524 ↑ 20.0 3 3 / 3

Sort (cost=20,628.97..20,629.12 rows=60 width=298) (actual time=184.524..184.524 rows=3 loops=3)

  • Sort Key: organisations.name, payment_methods.organisation_id
  • Sort Method: quicksort Memory: 25kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
  • Worker 1: Sort Method: quicksort Memory: 25kB
4. 24.850 184.483 ↑ 20.0 3 3 / 3

Partial HashAggregate (cost=20,626.29..20,627.19 rows=60 width=298) (actual time=184.481..184.483 rows=3 loops=3)

  • Group Key: organisations.name, payment_methods.organisation_id
5. 12.899 159.633 ↑ 1.6 103,865 3 / 3

Hash Left Join (cost=7,765.37..18,598.06 rows=162,259 width=244) (actual time=91.449..159.633 rows=103,865 loops=3)

  • Hash Cond: (organisations.id = org_bank_accounts.organisation_id)
6. 14.783 146.563 ↑ 1.2 103,865 3 / 3

Hash Join (cost=7,754.55..18,217.62 rows=129,807 width=252) (actual time=91.264..146.563 rows=103,865 loops=3)

  • Hash Cond: (payment_methods.organisation_id = organisations.id)
7. 64.888 131.568 ↑ 1.2 103,865 3 / 3

Parallel Hash Join (cost=7,744.10..17,794.23 rows=129,807 width=26) (actual time=91.028..131.568 rows=103,865 loops=3)

  • Hash Cond: (payments.oinvoice_id = oinvoices.id)
8. 12.278 34.705 ↑ 1.2 103,865 3 / 3

Hash Join (cost=480.00..7,898.38 rows=129,807 width=26) (actual time=2.842..34.705 rows=103,865 loops=3)

  • Hash Cond: (payments.payment_method_id = payment_methods.id)
9. 19.789 19.789 ↑ 1.2 103,865 3 / 3

Parallel Seq Scan on payments (cost=0.00..7,077.49 rows=129,807 width=26) (actual time=0.172..19.789 rows=103,865 loops=3)

  • Filter: (outcome = 'paid'::bpchar)
  • Rows Removed by Filter: 16295
10. 0.946 2.638 ↑ 1.0 10,000 3 / 3

Hash (cost=355.00..355.00 rows=10,000 width=16) (actual time=2.638..2.638 rows=10,000 loops=3)

  • Buckets: 16384 Batches: 1 Memory Usage: 597kB
11. 1.692 1.692 ↑ 1.0 10,000 3 / 3

Seq Scan on payment_methods (cost=0.00..355.00 rows=10,000 width=16) (actual time=0.133..1.692 rows=10,000 loops=3)

12. 15.914 31.975 ↑ 1.3 104,675 3 / 3

Parallel Hash (cost=5,103.49..5,103.49 rows=131,649 width=8) (actual time=31.975..31.975 rows=104,675 loops=3)

  • Buckets: 131072 Batches: 8 Memory Usage: 2624kB
13. 16.061 16.061 ↑ 1.3 104,675 3 / 3

Parallel Seq Scan on oinvoices (cost=0.00..5,103.49 rows=131,649 width=8) (actual time=0.010..16.061 rows=104,675 loops=3)

  • Filter: ((org_payment_batch_id IS NULL) AND (org_payment_batch_id IS NULL))
14. 0.011 0.212 ↑ 6.7 3 3 / 3

Hash (cost=10.20..10.20 rows=20 width=226) (actual time=0.212..0.212 rows=3 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
15. 0.201 0.201 ↑ 6.7 3 3 / 3

Seq Scan on organisations (cost=0.00..10.20 rows=20 width=226) (actual time=0.201..0.201 rows=3 loops=3)

16. 0.004 0.171 ↑ 8.3 3 3 / 3

Hash (cost=10.50..10.50 rows=25 width=8) (actual time=0.171..0.171 rows=3 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
17. 0.167 0.167 ↑ 8.3 3 3 / 3

Seq Scan on org_bank_accounts (cost=0.00..10.50 rows=25 width=8) (actual time=0.167..0.167 rows=3 loops=3)

  • Filter: (active IS TRUE)
Planning time : 6.634 ms