explain.depesz.com

PostgreSQL's explain analyze made readable

Result: BXWl

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 7.453 ↓ 7.0 7 1

Limit (cost=156.86..176.88 rows=1 width=92) (actual time=7.435..7.453 rows=7 loops=1)

  • Buffers: shared hit=13,128
2. 0.006 7.452 ↓ 7.0 7 1

Result (cost=156.86..176.88 rows=1 width=92) (actual time=7.435..7.452 rows=7 loops=1)

  • Buffers: shared hit=13,128
3. 0.102 7.425 ↓ 7.0 7 1

Sort (cost=156.86..156.86 rows=1 width=90) (actual time=7.424..7.425 rows=7 loops=1)

  • Sort Key: pickuppoints_pickupslot.date
  • Sort Method: top-N heapsort Memory: 26kB
  • Buffers: shared hit=13,086
4. 0.318 7.323 ↓ 193.0 193 1

Nested Loop (cost=69.09..156.85 rows=1 width=90) (actual time=0.282..7.323 rows=193 loops=1)

  • Buffers: shared hit=13,086
5. 0.139 6.812 ↓ 193.0 193 1

Nested Loop (cost=68.82..156.46 rows=1 width=89) (actual time=0.274..6.812 rows=193 loops=1)

  • Buffers: shared hit=12,507
6. 0.290 6.287 ↓ 193.0 193 1

Nested Loop (cost=68.27..155.78 rows=1 width=81) (actual time=0.269..6.287 rows=193 loops=1)

  • Buffers: shared hit=11,349
7. 0.660 0.882 ↓ 50.1 1,705 1

Bitmap Heap Scan on pickuppoints_pickupslot pickuppoints_pickupslot (cost=67.44..107.35 rows=34 width=73) (actual time=0.242..0.882 rows=1,705 loops=1)

  • Filter: ((pickuppoints_pickupslot.available_time IS NULL) OR (pickuppoints_pickupslot.available_time <= '2020-10-11 20:17:10.982163+02'::timestamp with time zone))
  • Heap Blocks: exact=246
  • Buffers: shared hit=268
8. 0.010 0.222 ↓ 0.0 0 1

BitmapAnd (cost=67.44..67.44 rows=36 width=0) (actual time=0.222..0.222 rows=0 loops=1)

  • Buffers: shared hit=22
9. 0.083 0.083 ↓ 1.0 1,966 1

Bitmap Index Scan on pickuppoints_pickupslot_date_idx (cost=0..26.26 rows=1,924 width=0) (actual time=0.083..0.083 rows=1,966 loops=1)

  • Index Cond: ((pickuppoints_pickupslot.date >= '2020-10-11'::date) AND (pickuppoints_pickupslot.date <= '2020-10-25'::date))
  • Buffers: shared hit=9
10. 0.129 0.129 ↑ 1.0 3,785 1

Bitmap Index Scan on pickuppoints_pickupslot_cutoff_time_9d377ee3 (cost=0..40.92 rows=3,786 width=0) (actual time=0.129..0.129 rows=3,785 loops=1)

  • Index Cond: (pickuppoints_pickupslot.cutoff_time > '2020-10-11 20:17:10.986316+02'::timestamp with time zone)
  • Buffers: shared hit=13
11. 0.854 5.115 ↓ 0.0 0 1,705

Nested Loop (cost=0.83..1.41 rows=1 width=8) (actual time=0.003..0.003 rows=0 loops=1,705)

  • Filter: ((u3.area_id IS NULL) OR (u3.area_id = 376))
  • Buffers: shared hit=11,081
12. 0.854 3.410 ↓ 0.0 0 1,705

Nested Loop (cost=0.55..0.93 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=1,705)

  • Buffers: shared hit=7,668
13. 1.705 1.705 ↓ 0.0 0 1,705

Index Scan using pickuppoints_pickuppoint_for_groups_pickuppoint_id_idx on pickuppoints_pickuppoint_for_groups u1 (cost=0.28..0.55 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=1,705)

  • Index Cond: (u1.pickuppoint_id = pickuppoints_pickupslot.pickup_point_id)
  • Filter: (u1.usergroup_id = 1)
  • Buffers: shared hit=5,115
14. 0.851 0.851 ↑ 1.0 1 851

Index Scan using pickuppoints_pickuppoint_pkey on pickuppoints_pickuppoint u0 (cost=0.28..0.36 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=851)

  • Index Cond: (u0.id = u1.pickuppoint_id)
  • Filter: u0.is_active
  • Buffers: shared hit=2,553
15. 0.851 0.851 ↑ 1.0 4 851

Index Scan using pickuppoints_pickuppoint_for_areas_pickuppoint_id_idx on pickuppoints_pickuppoint_for_areas u3 (cost=0.28..0.44 rows=4 width=8) (actual time=0.001..0.001 rows=4 loops=851)

  • Index Cond: (u3.pickuppoint_id = u0.id)
  • Buffers: shared hit=3,413
16. 0.000 0.386 ↑ 1.0 1 193

Nested Loop (cost=0.55..0.67 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=193)

  • Buffers: shared hit=1,158
17. 0.193 0.193 ↑ 1.0 1 193

Index Only Scan using pickuppoints_pickuppoint_pkey on pickuppoints_pickuppoint u0_1 (cost=0.28..0.36 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=193)

  • Index Cond: (u0_1.id = u1.pickuppoint_id)
  • Heap Fetches: 193
  • Buffers: shared hit=579
18. 0.193 0.193 ↑ 1.0 1 193

Index Scan using pickuppoints_pickuppoint_for_groups_pickuppoint_id_idx on pickuppoints_pickuppoint_for_groups u1_1 (cost=0.28..0.31 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=193)

  • Index Cond: (u1_1.pickuppoint_id = u0_1.id)
  • Filter: (u1_1.usergroup_id = 1)
  • Buffers: shared hit=579
19. 0.193 0.193 ↑ 1.0 1 193

Index Scan using pickuppoints_pickuppoint_pkey on pickuppoints_pickuppoint pickuppoints_pickuppoint (cost=0.28..0.35 rows=1 width=5) (actual time=0.001..0.001 rows=1 loops=193)

  • Index Cond: (pickuppoints_pickuppoint.id = u0_1.id)
  • Buffers: shared hit=579
20.          

SubPlan (for Result)

21. 0.000 0.007 ↓ 0.0 0 7

Nested Loop (cost=0.55..5 rows=1 width=0) (actual time=0.001..0.001 rows=0 loops=7)

  • Buffers: shared hit=14
22. 0.007 0.007 ↓ 0.0 0 7

Index Scan using backend_forecasting_fulf_date_group_id_2067a547_uniq on backend_forecasting_fulfillmentcapacity u1_2 (cost=0.28..2.49 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=7)

  • Index Cond: ((u1_2.date = pickuppoints_pickupslot.date) AND (u1_2.group_id = 1))
  • Filter: u1_2.include_same_day
  • Buffers: shared hit=14
23. 0.000 0.000 ↓ 0.0 0 0

Index Scan using backend_forecasting_salescap_fulfillment_slot_id_c8341929 on backend_forecasting_salescap u0_2 (cost=0.27..2.49 rows=1 width=4) (never executed)

  • Index Cond: (u0_2.fulfillment_slot_id = u1_2.id)
  • Filter: (NOT u0_2.is_deleted)
24. 0.000 0.000 ↓ 0.0 0 0

Hash Join (cost=22.55..31.82 rows=4 width=4) (never executed)

25. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on backend_forecasting_salescap u0_3 (cost=0..8.41 rows=326 width=4) (never executed)

  • Filter: (NOT u0_3.is_deleted)
26. 0.000 0.000 ↓ 0.0 0 0

Hash (cost=22.4..22.4 rows=12 width=8) (never executed)

27. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on backend_forecasting_fulfillmentcapacity u1_3 (cost=0..22.4 rows=12 width=8) (never executed)

  • Filter: (u1_3.include_same_day AND (u1_3.group_id = 1))
28. 0.000 0.007 ↓ 0.0 0 7

Nested Loop (cost=0.55..5 rows=1 width=0) (actual time=0.001..0.001 rows=0 loops=7)

  • Buffers: shared hit=14
29. 0.007 0.007 ↓ 0.0 0 7

Index Scan using backend_forecasting_fulf_date_group_id_2067a547_uniq on backend_forecasting_fulfillmentcapacity u1_4 (cost=0.28..2.49 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=7)

  • Index Cond: ((u1_4.date = pickuppoints_pickupslot.date) AND (u1_4.group_id = 1))
  • Buffers: shared hit=14
30. 0.000 0.000 ↓ 0.0 0 0

Index Scan using backend_forecasting_salescap_fulfillment_slot_id_c8341929 on backend_forecasting_salescap u0_4 (cost=0.27..2.49 rows=1 width=4) (never executed)

  • Index Cond: (u0_4.fulfillment_slot_id = u1_4.id)
  • Filter: (NOT u0_4.is_deleted)
31. 0.000 0.000 ↓ 0.0 0 0

Hash Join (cost=33.3..42.57 rows=312 width=4) (never executed)

32. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on backend_forecasting_salescap u0_5 (cost=0..8.41 rows=326 width=4) (never executed)

  • Filter: (NOT u0_5.is_deleted)
33. 0.000 0.000 ↓ 0.0 0 0

Hash (cost=22.4..22.4 rows=872 width=8) (never executed)

34. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on backend_forecasting_fulfillmentcapacity u1_5 (cost=0..22.4 rows=872 width=8) (never executed)

  • Filter: (u1_5.group_id = 1)
35. 0.000 0.000 ↓ 0.0 0 0

Nested Loop (cost=0.55..5 rows=1 width=0) (never executed)

36. 0.000 0.000 ↓ 0.0 0 0

Index Scan using backend_forecasting_fulf_date_group_id_2067a547_uniq on backend_forecasting_fulfillmentcapacity u1_6 (cost=0.28..2.49 rows=1 width=4) (never executed)

  • Index Cond: ((u1_6.date = pickuppoints_pickupslot.date) AND (u1_6.group_id = 1))
  • Filter: u1_6.include_same_day
37. 0.000 0.000 ↓ 0.0 0 0

Index Scan using backend_forecasting_salescap_fulfillment_slot_id_c8341929 on backend_forecasting_salescap u0_6 (cost=0.27..2.49 rows=1 width=4) (never executed)

  • Index Cond: (u0_6.fulfillment_slot_id = u1_6.id)
  • Filter: (NOT u0_6.is_deleted)
38. 0.000 0.000 ↓ 0.0 0 0

Hash Join (cost=22.55..31.82 rows=4 width=4) (never executed)

39. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on backend_forecasting_salescap u0_7 (cost=0..8.41 rows=326 width=4) (never executed)

  • Filter: (NOT u0_7.is_deleted)
40. 0.000 0.000 ↓ 0.0 0 0

Hash (cost=22.4..22.4 rows=12 width=8) (never executed)

41. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on backend_forecasting_fulfillmentcapacity u1_7 (cost=0..22.4 rows=12 width=8) (never executed)

  • Filter: (u1_7.include_same_day AND (u1_7.group_id = 1))
42. 0.000 0.007 ↓ 0.0 0 7

Nested Loop (cost=0.55..5 rows=1 width=0) (actual time=0.001..0.001 rows=0 loops=7)

  • Buffers: shared hit=14
43. 0.007 0.007 ↓ 0.0 0 7

Index Scan using backend_forecasting_fulf_date_group_id_2067a547_uniq on backend_forecasting_fulfillmentcapacity u1_8 (cost=0.28..2.49 rows=1 width=4) (actual time=0.001..0.001 rows=0 loops=7)

  • Index Cond: ((u1_8.date = pickuppoints_pickupslot.date) AND (u1_8.group_id = 1))
  • Buffers: shared hit=14
44. 0.000 0.000 ↓ 0.0 0 0

Index Scan using backend_forecasting_salescap_fulfillment_slot_id_c8341929 on backend_forecasting_salescap u0_8 (cost=0.27..2.49 rows=1 width=4) (never executed)

  • Index Cond: (u0_8.fulfillment_slot_id = u1_8.id)
  • Filter: (NOT u0_8.is_deleted)
45. 0.000 0.000 ↓ 0.0 0 0

Hash Join (cost=33.3..42.57 rows=312 width=4) (never executed)

46. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on backend_forecasting_salescap u0_9 (cost=0..8.41 rows=326 width=4) (never executed)

  • Filter: (NOT u0_9.is_deleted)
47. 0.000 0.000 ↓ 0.0 0 0

Hash (cost=22.4..22.4 rows=872 width=8) (never executed)

48. 0.000 0.000 ↓ 0.0 0 0

Seq Scan on backend_forecasting_fulfillmentcapacity u1_9 (cost=0..22.4 rows=872 width=8) (never executed)

  • Filter: (u1_9.group_id = 1)
Planning time : 1.992 ms
Execution time : 7.601 ms