explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PAw

Settings
# exclusive inclusive rows x rows loops node
1. 2.961 96.539 ↓ 2.3 753 1

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

  • Sort Key: rs.appt_id, rs.id
  • Sort Method: quicksort Memory: 1574kB
2. 1.342 93.578 ↓ 2.3 753 1

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

3. 9.782 90.728 ↓ 2.2 754 1

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

4. 18.258 41.646 ↓ 14.7 19,650 1

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

5. 0.004 0.006 ↑ 1.0 1 1

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

  • Group Key: 1153
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.382 23.382 ↓ 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.382 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 >= 1546300800) AND (invoice_generation_time <= 1567727999))
  • Rows Removed by Filter: 1
9. 1.508 1.508 ↑ 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.002..0.002 rows=1 loops=754)

  • Index Cond: (ride_detail_id = rs.id)
Planning time : 3.979 ms
Execution time : 98.116 ms