explain.depesz.com

PostgreSQL's explain analyze made readable

Result: egbb

Settings
# exclusive inclusive rows x rows loops node
1. 0.067 0.209 ↓ 0.0 0 1

Hash Right Join (cost=77.00..976.92 rows=4,500 width=10,552) (actual time=0.209..0.209 rows=0 loops=1)

  • Hash Cond: (invoices.appt_id = appointments.id)
2. 0.000 0.000 ↓ 0.0 0

Seq Scan on invoices (cost=0.00..19.00 rows=900 width=20) (never executed)

3. 0.000 0.142 ↓ 0.0 0 1

Hash (cost=76.93..76.93 rows=5 width=11,173) (actual time=0.142..0.142 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
4. 0.050 0.142 ↓ 0.0 0 1

Hash Right Join (cost=63.13..76.93 rows=5 width=11,173) (actual time=0.141..0.142 rows=0 loops=1)

  • Hash Cond: (pg_timezone_names.name = (rs.appt_timezone)::text)
5. 0.000 0.000 ↓ 0.0 0

Function Scan on pg_timezone_names (cost=0.00..10.00 rows=1,000 width=32) (never executed)

6. 0.001 0.092 ↓ 0.0 0 1

Hash (cost=63.12..63.12 rows=1 width=11,173) (actual time=0.092..0.092 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
7. 0.004 0.091 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.21..63.12 rows=1 width=11,173) (actual time=0.091..0.091 rows=0 loops=1)

8. 0.002 0.087 ↓ 0.0 0 1

Nested Loop Left Join (cost=1.06..60.70 rows=1 width=10,657) (actual time=0.087..0.087 rows=0 loops=1)

9. 0.001 0.085 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.79..50.09 rows=1 width=8,577) (actual time=0.085..0.085 rows=0 loops=1)

10. 0.001 0.084 ↓ 0.0 0 1

Nested Loop Left Join (cost=0.65..41.54 rows=1 width=8,065) (actual time=0.084..0.084 rows=0 loops=1)

  • Join Filter: (rs.org_id = organisations.id)
11. 0.002 0.083 ↓ 0.0 0 1

Nested Loop (cost=0.51..33.37 rows=1 width=7,453) (actual time=0.083..0.083 rows=0 loops=1)

12. 0.001 0.081 ↓ 0.0 0 1

Nested Loop (cost=0.38..24.45 rows=1 width=6,321) (actual time=0.081..0.081 rows=0 loops=1)

  • Join Filter: (rs.patient_id = patients.id)
13. 0.003 0.080 ↓ 0.0 0 1

Nested Loop (cost=0.25..16.30 rows=1 width=5,261) (actual time=0.080..0.080 rows=0 loops=1)

  • Join Filter: (appointments.id = rs.appt_id)
14. 0.077 0.077 ↓ 0.0 0 1

Index Scan using appt_id_and_id_ride_details_idx on ride_details rs (cost=0.12..8.14 rows=1 width=4,669) (actual time=0.077..0.077 rows=0 loops=1)

  • Filter: ((NOT is_pr_ride) AND (org_id = 1153) AND ((ride_category)::text = 'completed'::text))
15. 0.000 0.000 ↓ 0.0 0

Index Scan using appt_id_idx on appointments (cost=0.12..8.14 rows=1 width=600) (never executed)

  • Filter: (invoice_generated AND (invoice_generation_time >= 1546300800) AND (invoice_generation_time <= 1567727999))
16. 0.000 0.000 ↓ 0.0 0

Index Scan using patients_pkey on patients (cost=0.12..8.14 rows=1 width=1,068) (never executed)

17. 0.000 0.000 ↓ 0.0 0

Index Scan using unique_receipts_id on receipts (cost=0.14..8.15 rows=1 width=1,136) (never executed)

  • Index Cond: (ride_detail_id = rs.id)
18. 0.000 0.000 ↓ 0.0 0

Index Scan using organisations_pkey on organisations (cost=0.14..8.15 rows=1 width=620) (never executed)

  • Index Cond: (id = 1153)
19. 0.000 0.000 ↓ 0.0 0

Index Scan using market_segments_pkey on market_segments (cost=0.14..8.16 rows=1 width=520) (never executed)

  • Index Cond: (id = organisations.market_segment_id)
20. 0.000 0.000 ↓ 0.0 0

Nested Loop Left Join (cost=0.28..10.60 rows=1 width=2,088) (never executed)

21. 0.000 0.000 ↓ 0.0 0

Index Scan using dynamite_claims_pkey on dynamite_claims (cost=0.14..8.15 rows=1 width=544) (never executed)

  • Index Cond: (appointments.dynamite_claims_id = id)
22. 0.000 0.000 ↓ 0.0 0

Index Scan using dynamite_claims_adjuster_pkey on dynamite_claims_adjuster (cost=0.14..2.36 rows=1 width=1,552) (never executed)

  • Index Cond: (dynamite_claims.claims_adjuster_id = id)
23. 0.000 0.000 ↓ 0.0 0

Index Scan using org_payers_pkey on org_payers (cost=0.14..2.36 rows=1 width=524) (never executed)

  • Index Cond: (dynamite_claims.payer_id = id)