explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eBD3

Settings
# exclusive inclusive rows x rows loops node
1. 3.394 105.328 ↓ 2.3 753 1

Sort (cost=6,082.16..6,082.98 rows=328 width=6,099) (actual time=105.159..105.328 rows=753 loops=1)

  • Sort Key: appointments.id, rs.id
  • Sort Method: quicksort Memory: 1,574kB
2. 1.194 101.934 ↓ 2.3 753 1

Nested Loop (cost=1.29..6,068.45 rows=328 width=6,099) (actual time=1.581..101.934 rows=753 loops=1)

3. 9.599 90.938 ↓ 2.2 754 1

Nested Loop (cost=0.87..5,881.50 rows=339 width=5,196) (actual time=1.563..90.938 rows=754 loops=1)

4. 18.323 42.039 ↓ 14.7 19,650 1

Nested Loop (cost=0.45..5,037.14 rows=1,337 width=3,241) (actual time=0.024..42.039 rows=19,650 loops=1)

5. 0.005 0.007 ↑ 1.0 1 1

HashAggregate (cost=0.02..0.03 rows=1 width=4) (actual time=0.005..0.007 rows=1 loops=1)

  • Group Key: 1,153
6. 0.002 0.002 ↑ 1.0 1 1

Result (cost=0.00..0.01 rows=1 width=4) (actual time=0.001..0.002 rows=1 loops=1)

7. 23.709 23.709 ↓ 14.7 19,650 1

Index Scan using idx_ride_organisationid on ride_details rs (cost=0.42..5,023.74 rows=1,337 width=3,241) (actual time=0.012..23.709 rows=19,650 loops=1)

  • Index Cond: (org_id = (1153))
  • Filter: ((NOT is_pr_ride) AND ((ride_category)::text = 'completed'::text))
  • Rows Removed by Filter: 20
8. 39.300 39.300 ↓ 0.0 0 19,650

Index Scan using appt_id_idx on appointments (cost=0.42..0.63 rows=1 width=1,955) (actual time=0.002..0.002 rows=0 loops=19,650)

  • Index Cond: (id = rs.appt_id)
  • Filter: (invoice_generated AND (invoice_generation_time >= 1,546,300,800) AND (invoice_generation_time <= 1,567,727,999))
  • Rows Removed by Filter: 1
9. 9.802 9.802 ↑ 1.0 1 754

Index Scan using idx_ride_detail_id on receipts (cost=0.42..0.55 rows=1 width=895) (actual time=0.013..0.013 rows=1 loops=754)

  • Index Cond: (ride_detail_id = rs.id)
Planning time : 4.089 ms
Execution time : 106.860 ms