explain.depesz.com

PostgreSQL's explain analyze made readable

Result: QPEu

Settings
# exclusive inclusive rows x rows loops node
1. 3.331 2,817.688 ↑ 1.0 1 1

Aggregate (cost=60,827.87..60,827.88 rows=1 width=8) (actual time=2,817.688..2,817.688 rows=1 loops=1)

2. 0.000 2,814.357 ↓ 1,584.6 26,939 1

Nested Loop Left Join (cost=1,008.75..60,827.82 rows=17 width=0) (actual time=1.135..2,814.357 rows=26,939 loops=1)

3. 43.571 2,706.902 ↓ 1,584.6 26,939 1

Nested Loop Left Join (cost=1,008.46..60,686.34 rows=17 width=16) (actual time=1.126..2,706.902 rows=26,939 loops=1)

4. 12.888 265.760 ↓ 1,584.6 26,939 1

Nested Loop (cost=1,008.32..60,579.03 rows=17 width=48) (actual time=1.060..265.760 rows=26,939 loops=1)

5. 29.290 252.872 ↓ 1,584.6 26,939 1

Nested Loop Left Join (cost=1,008.32..60,578.52 rows=17 width=324) (actual time=1.058..252.872 rows=26,939 loops=1)

6. 0.000 35.009 ↓ 1,584.6 26,939 1

Gather (cost=1,000.00..60,436.74 rows=17 width=384) (actual time=1.043..35.009 rows=26,939 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
7. 265.666 265.666 ↓ 1,282.9 8,980 3 / 3

Parallel Seq Scan on booking (cost=0.00..59,435.04 rows=7 width=384) (actual time=0.027..265.666 rows=8,980 loops=3)

  • Filter: ((dropbox_file_request IS NOT NULL) AND ((dropbox_file_request -> 'auto_raw_editing'::text) IS NULL) AND ((status)::text <> 'cancelled'::text) AND ((status)::text = ANY ('{paid,completed}'::text[])))
  • Rows Removed by Filter: 320,844
8. 26.939 188.573 ↑ 1.0 1 26,939

Limit (cost=8.31..8.32 rows=1 width=144) (actual time=0.007..0.007 rows=1 loops=26,939)

9. 26.939 161.634 ↑ 1.0 1 26,939

Sort (cost=8.31..8.32 rows=1 width=144) (actual time=0.006..0.006 rows=1 loops=26,939)

  • Sort Key: booking_submission.created_at DESC
  • Sort Method: quicksort Memory: 25kB
10. 134.695 134.695 ↑ 1.0 1 26,939

Index Scan using booking_submission_booking_uid_index on booking_submission (cost=0.29..8.30 rows=1 width=144) (actual time=0.004..0.005 rows=1 loops=26,939)

  • Index Cond: (booking_uid = booking.uid)
11. 0.000 0.000 ↑ 1.0 1 26,939

Result (cost=0.00..0.01 rows=1 width=32) (actual time=0.000..0.000 rows=1 loops=26,939)

12. 2,397.571 2,397.571 ↑ 1.0 1 26,939

Index Scan using location_polygon_idx on location (cost=0.15..6.30 rows=1 width=1,276) (actual time=0.084..0.089 rows=1 loops=26,939)

  • Index Cond: (st_flipcoordinates(booking.point) && st_flipcoordinates(polygon))
  • Filter: _st_intersects(st_flipcoordinates(booking.point), st_flipcoordinates(polygon))
  • Rows Removed by Filter: 0
13. 26.939 107.756 ↓ 0.0 0 26,939

Limit (cost=0.29..8.30 rows=1 width=32) (actual time=0.003..0.004 rows=0 loops=26,939)

14. 80.817 80.817 ↓ 0.0 0 26,939

Index Only Scan using editor_time_booking_uid_started_at_idx on editor_time (cost=0.29..8.30 rows=1 width=32) (actual time=0.003..0.003 rows=0 loops=26,939)

  • Index Cond: (booking_uid = booking.uid)
  • Heap Fetches: 702
Planning time : 6.225 ms
Execution time : 2,817.870 ms