explain.depesz.com

PostgreSQL's explain analyze made readable

Result: voTN

Settings
# exclusive inclusive rows x rows loops node
1. 13.943 104.196 ↑ 5.6 723 1

Gather Merge (cost=94,782.24..95,255.94 rows=4,060 width=1,178) (actual time=101.802..104.196 rows=723 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 0.913 90.253 ↑ 8.4 241 3 / 3

Sort (cost=93,782.22..93,787.29 rows=2,030 width=1,178) (actual time=90.167..90.253 rows=241 loops=3)

  • Sort Key: rs.appt_id, rs.id
  • Sort Method: quicksort Memory: 148kB
  • Worker 0: Sort Method: quicksort Memory: 84kB
  • Worker 1: Sort Method: quicksort Memory: 221kB
3. 6.104 89.340 ↑ 8.4 241 3 / 3

Hash Left Join (cost=618.05..93,670.70 rows=2,030 width=1,178) (actual time=8.037..89.340 rows=241 loops=3)

  • Hash Cond: (dynamite_claims.payer_id = org_payers.id)
4. 0.351 83.135 ↑ 8.4 241 3 / 3

Hash Left Join (cost=615.31..93,292.15 rows=2,030 width=839) (actual time=7.502..83.135 rows=241 loops=3)

  • Hash Cond: (dynamite_claims.claims_adjuster_id = dynamite_claims_adjuster.id)
5. 0.376 77.601 ↑ 8.4 241 3 / 3

Nested Loop Left Join (cost=521.21..93,192.71 rows=2,030 width=816) (actual time=2.288..77.601 rows=241 loops=3)

6. 0.374 76.984 ↑ 8.4 241 3 / 3

Hash Left Join (cost=520.92..92,508.41 rows=2,030 width=786) (actual time=2.277..76.984 rows=241 loops=3)

  • Hash Cond: (organisations.market_segment_id = market_segments.id)
7. 0.468 76.108 ↑ 8.4 241 3 / 3

Hash Left Join (cost=503.70..92,485.82 rows=2,030 width=772) (actual time=1.755..76.108 rows=241 loops=3)

  • Hash Cond: (rs.org_id = organisations.id)
8. 0.500 75.618 ↑ 8.4 241 3 / 3

Nested Loop (cost=495.39..92,449.60 rows=2,030 width=689) (actual time=1.654..75.618 rows=241 loops=3)

9. 0.456 74.365 ↑ 8.1 251 3 / 3

Nested Loop Left Join (cost=495.10..91,536.97 rows=2,030 width=693) (actual time=1.631..74.365 rows=251 loops=3)

10. 0.541 72.905 ↑ 8.1 251 3 / 3

Nested Loop (cost=494.68..90,163.91 rows=2,030 width=681) (actual time=1.616..72.905 rows=251 loops=3)

11. 0.588 70.105 ↑ 8.1 251 3 / 3

Nested Loop (cost=494.26..86,055.53 rows=2,031 width=633) (actual time=1.599..70.105 rows=251 loops=3)

12. 11.067 68.512 ↑ 8.1 251 3 / 3

Nested Loop (cost=493.83..79,504.88 rows=2,042 width=541) (actual time=1.578..68.512 rows=251 loops=3)

13. 23.743 24.695 ↑ 1.2 6,550 3 / 3

Parallel Bitmap Heap Scan on ride_details rs (cost=493.41..49,896.81 rows=8,058 width=424) (actual time=1.439..24.695 rows=6,550 loops=3)

  • Recheck Cond: (org_id = 1153)
  • Filter: ((NOT is_pr_ride) AND ((ride_category)::text = 'completed'::text))
  • Rows Removed by Filter: 7
  • Heap Blocks: exact=1518
14. 0.952 0.952 ↑ 1.0 19,670 1 / 3

Bitmap Index Scan on idx_ride_organisationid (cost=0.00..488.57 rows=19,753 width=0) (actual time=2.856..2.856 rows=19,670 loops=1)

  • Index Cond: (org_id = 1153)
15. 32.750 32.750 ↓ 0.0 0 19,650 / 3

Index Scan using appt_id_idx on appointments (cost=0.42..3.67 rows=1 width=117) (actual time=0.005..0.005 rows=0 loops=19,650)

  • Index Cond: (id = rs.appt_id)
  • Filter: (invoice_generated AND (invoice_generation_time >= 1546300800) AND (invoice_generation_time <= 1567727999))
  • Rows Removed by Filter: 1
16. 1.005 1.005 ↑ 1.0 1 754 / 3

Index Scan using unique_ride on receipts (cost=0.42..3.21 rows=1 width=96) (actual time=0.004..0.004 rows=1 loops=754)

  • Index Cond: (ride_detail_id = rs.id)
17. 2.259 2.259 ↑ 1.0 1 753 / 3

Index Scan using patients_pkey on patients (cost=0.42..2.02 rows=1 width=56) (actual time=0.009..0.009 rows=1 loops=753)

  • Index Cond: (id = rs.patient_id)
18. 1.004 1.004 ↑ 1.0 1 753 / 3

Index Scan using idx_invoice_aptid on invoices (cost=0.42..0.68 rows=1 width=20) (actual time=0.004..0.004 rows=1 loops=753)

  • Index Cond: (appt_id = appointments.id)
19. 0.753 0.753 ↑ 1.0 1 753 / 3

Index Only Scan using users_pkey on users (cost=0.29..0.45 rows=1 width=4) (actual time=0.003..0.003 rows=1 loops=753)

  • Index Cond: (id = rs.ride_requester_id)
  • Heap Fetches: 723
20. 0.007 0.022 ↑ 1.0 1 3 / 3

Hash (cost=8.30..8.30 rows=1 width=91) (actual time=0.021..0.022 rows=1 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
21. 0.015 0.015 ↑ 1.0 1 3 / 3

Index Scan using organisations_pkey on organisations (cost=0.28..8.30 rows=1 width=91) (actual time=0.014..0.015 rows=1 loops=3)

  • Index Cond: (id = 1153)
22. 0.261 0.502 ↑ 1.0 454 3 / 3

Hash (cost=11.54..11.54 rows=454 width=22) (actual time=0.502..0.502 rows=454 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 33kB
23. 0.241 0.241 ↑ 1.0 454 3 / 3

Seq Scan on market_segments (cost=0.00..11.54 rows=454 width=22) (actual time=0.010..0.241 rows=454 loops=3)

24. 0.241 0.241 ↓ 0.0 0 723 / 3

Index Scan using dynamite_claims_pkey on dynamite_claims (cost=0.29..0.34 rows=1 width=38) (actual time=0.000..0.001 rows=0 loops=723)

  • Index Cond: (appointments.dynamite_claims_id = id)
25. 2.676 5.183 ↓ 1.0 2,162 3 / 3

Hash (cost=67.38..67.38 rows=2,138 width=31) (actual time=5.183..5.183 rows=2,162 loops=3)

  • Buckets: 4096 Batches: 1 Memory Usage: 172kB
26. 2.507 2.507 ↓ 1.0 2,162 3 / 3

Seq Scan on dynamite_claims_adjuster (cost=0.00..67.38 rows=2,138 width=31) (actual time=0.010..2.507 rows=2,162 loops=3)

27. 0.052 0.101 ↑ 1.0 77 3 / 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
28. 0.049 0.049 ↑ 1.0 77 3 / 3

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

Planning time : 7.092 ms
Execution time : 104.999 ms