explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UAf2

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 3.602 ↑ 1.0 1 1

Limit (cost=1,052.95..1,052.96 rows=1 width=1,898) (actual time=3.601..3.602 rows=1 loops=1)

2. 0.025 3.600 ↑ 2.0 1 1

Sort (cost=1,052.95..1,052.96 rows=2 width=1,898) (actual time=3.600..3.600 rows=1 loops=1)

  • Sort Key: b.created_at DESC
  • Sort Method: quicksort Memory: 29kB
3. 0.017 3.575 ↑ 1.0 2 1

Nested Loop Left Join (cost=1.12..1,052.94 rows=2 width=1,898) (actual time=2.587..3.575 rows=2 loops=1)

4. 0.142 0.142 ↓ 2.0 2 1

Index Scan using booking_idx_store_order_id on bookings b (cost=0.56..950.22 rows=1 width=1,890) (actual time=0.116..0.142 rows=2 loops=1)

  • Index Cond: ((store_order_id)::text = 'P81KN5-9032'::text)
  • Filter: (((bookable_type)::text = 'Store'::text) AND (owner_id = 12))
5. 3.416 3.416 ↑ 25.0 1 2

Index Scan using index_locations_on_booking_id_and_type on locations l (cost=0.56..102.47 rows=25 width=16) (actual time=1.707..1.708 rows=1 loops=2)

  • Index Cond: ((b.id = booking_id) AND ((type)::text = 'Drop'::text))
Planning time : 17.837 ms
Execution time : 3.693 ms