explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Dfrb

Settings
# exclusive inclusive rows x rows loops node
1. 3,972.042 16,135.826 ↑ 1.3 371,077 1

Gather Merge (cost=565,737.09..622,770.30 rows=488,822 width=922) (actual time=12,096.718..16,135.826 rows=371,077 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 1,436.293 12,163.784 ↑ 2.0 123,692 3 / 3

Sort (cost=564,737.06..565,348.09 rows=244,411 width=922) (actual time=12,001.945..12,163.784 rows=123,692 loops=3)

  • Sort Key: rs.appt_id, rs.id
  • Sort Method: external merge Disk: 61,712kB
  • Worker 0: Sort Method: external merge Disk: 60,736kB
  • Worker 1: Sort Method: external merge Disk: 48,528kB
3. 2,521.430 10,727.491 ↑ 2.0 123,692 3 / 3

Hash Left Join (cost=88,023.56..344,035.56 rows=244,411 width=922) (actual time=5,468.148..10,727.491 rows=123,692 loops=3)

  • Hash Cond: (dynamite_claims.payer_id = org_payers.id)
4. 339.687 8,205.954 ↑ 2.0 123,692 3 / 3

Hash Left Join (cost=88,020.83..328,725.16 rows=244,411 width=759) (actual time=5,467.591..8,205.954 rows=123,692 loops=3)

  • Hash Cond: (dynamite_claims.claims_adjuster_id = dynamite_claims_adjuster.id)
5. 409.440 7,862.589 ↑ 2.0 123,692 3 / 3

Hash Left Join (cost=87,949.19..328,011.90 rows=244,411 width=736) (actual time=5,463.878..7,862.589 rows=123,692 loops=3)

  • Hash Cond: (organisations.market_segment_id = market_segments.id)
6. 895.086 7,452.537 ↑ 2.0 123,692 3 / 3

Hash Left Join (cost=87,931.97..327,347.12 rows=244,411 width=722) (actual time=5,463.243..7,452.537 rows=123,692 loops=3)

  • Hash Cond: (appointments.dynamite_claims_id = dynamite_claims.id)
7. 480.370 6,411.984 ↑ 2.0 123,692 3 / 3

Hash Left Join (cost=85,491.27..280,799.83 rows=244,411 width=692) (actual time=5,317.569..6,411.984 rows=123,692 loops=3)

  • Hash Cond: (rs.org_id = organisations.id)
8. 1,259.825 5,910.720 ↑ 2.0 123,692 3 / 3

Parallel Hash Join (cost=85,193.41..279,859.87 rows=244,411 width=609) (actual time=5,296.656..5,910.720 rows=123,692 loops=3)

  • Hash Cond: (rs.appt_id = appointments.id)
9. 761.808 3,559.768 ↑ 2.0 123,701 3 / 3

Parallel Hash Join (cost=33,054.12..192,137.92 rows=244,411 width=480) (actual time=3,157.977..3,559.768 rows=123,701 loops=3)

  • Hash Cond: (rs.patient_id = patients.id)
10. 304.492 2,582.921 ↑ 1.9 129,851 3 / 3

Hash Join (cost=22,778.24..152,927.29 rows=244,476 width=432) (actual time=1,826.707..2,582.921 rows=129,851 loops=3)

  • Hash Cond: (rs.ride_requester_id = users.id)
11. 1,040.405 2,230.646 ↑ 1.3 194,997 3 / 3

Parallel Hash Join (cost=21,225.71..150,732.95 rows=244,476 width=436) (actual time=1,778.752..2,230.646 rows=194,997 loops=3)

  • Hash Cond: (rs.id = receipts.ride_detail_id)
12. 657.397 657.397 ↑ 1.3 201,368 3 / 3

Parallel Seq Scan on ride_details rs (cost=0.00..100,116.42 rows=251,742 width=424) (actual time=0.011..657.397 rows=201,368 loops=3)

13. 240.939 532.844 ↑ 1.3 195,549 3 / 3

Parallel Hash (cost=16,975.76..16,975.76 rows=244,476 width=16) (actual time=532.843..532.844 rows=195,549 loops=3)

  • Buckets: 131,072 Batches: 16 Memory Usage: 2,784kB
14. 291.905 291.905 ↑ 1.3 195,549 3 / 3

Parallel Seq Scan on receipts (cost=0.00..16,975.76 rows=244,476 width=16) (actual time=0.008..291.905 rows=195,549 loops=3)

15. 24.782 47.783 ↑ 1.0 29,424 3 / 3

Hash (cost=1,184.46..1,184.46 rows=29,446 width=4) (actual time=47.782..47.783 rows=29,424 loops=3)

  • Buckets: 32,768 Batches: 1 Memory Usage: 1,291kB
16. 23.001 23.001 ↑ 1.0 29,424 3 / 3

Seq Scan on users (cost=0.00..1,184.46 rows=29,446 width=4) (actual time=0.018..23.001 rows=29,424 loops=3)

17. 116.081 215.039 ↑ 1.2 88,036 3 / 3

Parallel Hash (cost=7,825.39..7,825.39 rows=110,039 width=56) (actual time=215.038..215.039 rows=88,036 loops=3)

  • Buckets: 65,536 Batches: 8 Memory Usage: 3,584kB
18. 98.958 98.958 ↑ 1.2 88,036 3 / 3

Parallel Seq Scan on patients (cost=0.00..7,825.39 rows=110,039 width=56) (actual time=0.011..98.958 rows=88,036 loops=3)

19. 199.162 1,091.127 ↑ 1.3 146,274 3 / 3

Parallel Hash (cost=46,281.53..46,281.53 rows=182,861 width=133) (actual time=1,091.126..1,091.127 rows=146,274 loops=3)

  • Buckets: 32,768 Batches: 32 Memory Usage: 1,536kB
20. 388.810 891.965 ↑ 1.3 146,274 3 / 3

Parallel Hash Left Join (cost=10,096.91..46,281.53 rows=182,861 width=133) (actual time=660.318..891.965 rows=146,274 loops=3)

  • Hash Cond: (appointments.id = invoices.appt_id)
21. 254.072 254.072 ↑ 1.3 146,274 3 / 3

Parallel Seq Scan on appointments (cost=0.00..28,253.61 rows=182,861 width=117) (actual time=0.008..254.072 rows=146,274 loops=3)

22. 130.952 249.083 ↑ 1.2 139,271 3 / 3

Parallel Hash (cost=6,899.85..6,899.85 rows=174,085 width=20) (actual time=249.083..249.083 rows=139,271 loops=3)

  • Buckets: 65,536 Batches: 8 Memory Usage: 3,392kB
23. 118.131 118.131 ↑ 1.2 139,271 3 / 3

Parallel Seq Scan on invoices (cost=0.00..6,899.85 rows=174,085 width=20) (actual time=0.013..118.131 rows=139,271 loops=3)

24. 6.916 20.894 ↓ 1.0 5,021 3 / 3

Hash (cost=235.16..235.16 rows=5,016 width=91) (actual time=20.893..20.894 rows=5,021 loops=3)

  • Buckets: 8,192 Batches: 1 Memory Usage: 642kB
25. 13.978 13.978 ↓ 1.0 5,021 3 / 3

Seq Scan on organisations (cost=0.00..235.16 rows=5,016 width=91) (actual time=0.015..13.978 rows=5,021 loops=3)

26. 76.346 145.467 ↑ 1.0 64,120 3 / 3

Hash (cost=1,138.20..1,138.20 rows=64,120 width=38) (actual time=145.467..145.467 rows=64,120 loops=3)

  • Buckets: 65,536 Batches: 2 Memory Usage: 1,681kB
27. 69.121 69.121 ↑ 1.0 64,120 3 / 3

Seq Scan on dynamite_claims (cost=0.00..1,138.20 rows=64,120 width=38) (actual time=0.014..69.121 rows=64,120 loops=3)

28. 0.361 0.612 ↓ 1.0 459 3 / 3

Hash (cost=11.54..11.54 rows=454 width=22) (actual time=0.611..0.612 rows=459 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 34kB
29. 0.251 0.251 ↓ 1.0 459 3 / 3

Seq Scan on market_segments (cost=0.00..11.54 rows=454 width=22) (actual time=0.016..0.251 rows=459 loops=3)

30. 1.922 3.678 ↑ 1.0 2,162 3 / 3

Hash (cost=44.62..44.62 rows=2,162 width=31) (actual time=3.678..3.678 rows=2,162 loops=3)

  • Buckets: 4,096 Batches: 1 Memory Usage: 172kB
31. 1.756 1.756 ↑ 1.0 2,162 3 / 3

Seq Scan on dynamite_claims_adjuster (cost=0.00..44.62 rows=2,162 width=31) (actual time=0.013..1.756 rows=2,162 loops=3)

32. 0.055 0.107 ↑ 1.0 77 3 / 3

Hash (cost=1.77..1.77 rows=77 width=29) (actual time=0.107..0.107 rows=77 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 13kB
33. 0.052 0.052 ↑ 1.0 77 3 / 3

Seq Scan on org_payers (cost=0.00..1.77 rows=77 width=29) (actual time=0.014..0.052 rows=77 loops=3)

Planning time : 7.268 ms
Execution time : 17,083.806 ms