explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0w0s

Settings
# exclusive inclusive rows x rows loops node
1. 4.923 50.654 ↓ 711.0 711 1

Nested Loop Left Join (cost=33.62..940.11 rows=1 width=1,536) (actual time=0.718..50.654 rows=711 loops=1)

2.          

CTE basic_data

3. 0.006 0.072 ↑ 1.0 1 1

Nested Loop (cost=0.71..20.54 rows=1 width=532) (actual time=0.056..0.072 rows=1 loops=1)

  • Join Filter: (ct.countryid = fc2.countryid)
  • Rows Removed by Join Filter: 6
4. 0.003 0.060 ↑ 1.0 1 1

Nested Loop (cost=0.71..18.81 rows=1 width=535) (actual time=0.049..0.060 rows=1 loops=1)

  • Join Filter: (ct.countryid = fc.countryid)
5. 0.000 0.049 ↑ 1.0 1 1

Nested Loop (cost=0.71..17.16 rows=1 width=530) (actual time=0.043..0.049 rows=1 loops=1)

6. 0.004 0.044 ↑ 1.0 1 1

Nested Loop (cost=0.57..16.90 rows=1 width=10) (actual time=0.039..0.044 rows=1 loops=1)

7. 0.000 0.039 ↑ 1.0 1 1

Nested Loop (cost=0.43..16.73 rows=1 width=10) (actual time=0.035..0.039 rows=1 loops=1)

8. 0.036 0.036 ↑ 1.0 1 1

Index Scan using mwq_areapolygons_polygongeo on mwq_areapolygons ap (cost=0.15..8.42 rows=1 width=4) (actual time=0.032..0.036 rows=1 loops=1)

  • Index Cond: (polygongeo && '0101000020E6100000915F3FC406FF4740D7DCD1FF72553D40'::geometry)
  • Filter: _st_intersects(polygongeo, '0101000020E6100000915F3FC406FF4740D7DCD1FF72553D40'::geometry)
  • Rows Removed by Filter: 1
9. 0.003 0.003 ↑ 1.0 1 1

Index Scan using mwq_area_pkey on mwq_area a_1 (cost=0.28..8.30 rows=1 width=10) (actual time=0.003..0.003 rows=1 loops=1)

  • Index Cond: (id = ap.id)
10. 0.001 0.001 ↑ 1.0 1 1

Index Scan using mwq_city_pkey on mwq_city ct (cost=0.14..0.16 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=1)

  • Index Cond: (id = a_1.cityid)
11. 0.005 0.005 ↑ 1.0 1 1

Index Scan using tgb_countrysettings_pkey on tgb_countrysettings cs (cost=0.13..0.25 rows=1 width=520) (actual time=0.004..0.005 rows=1 loops=1)

  • Index Cond: (countryid = ct.countryid)
12. 0.008 0.008 ↑ 1.0 1 1

Seq Scan on tgb_featurecountry fc (cost=0.00..1.64 rows=1 width=5) (actual time=0.005..0.008 rows=1 loops=1)

  • Filter: (featureid = 2)
  • Rows Removed by Filter: 50
13. 0.006 0.006 ↑ 1.0 7 1

Seq Scan on tgb_featurecountry fc2 (cost=0.00..1.64 rows=7 width=5) (actual time=0.002..0.006 rows=7 loops=1)

  • Filter: (featureid = 1)
  • Rows Removed by Filter: 44
14.          

Initplan (forNested Loop Left Join)

15. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on basic_data (cost=0.00..0.02 rows=1 width=1) (actual time=0.001..0.001 rows=1 loops=1)

16. 0.000 0.000 ↑ 1.0 1 1

CTE Scan on basic_data basic_data_1 (cost=0.00..0.02 rows=1 width=1) (actual time=0.000..0.000 rows=1 loops=1)

17. 0.000 0.000 ↑ 1.0 1 1

CTE Scan on basic_data basic_data_2 (cost=0.00..0.02 rows=1 width=1) (actual time=0.000..0.000 rows=1 loops=1)

18. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on basic_data basic_data_3 (cost=0.00..0.02 rows=1 width=1) (actual time=0.001..0.001 rows=1 loops=1)

19. 0.000 0.000 ↑ 1.0 1 1

CTE Scan on basic_data basic_data_4 (cost=0.00..0.02 rows=1 width=1) (actual time=0.000..0.000 rows=1 loops=1)

20. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on basic_data basic_data_5 (cost=0.00..0.02 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=1)

21. 0.001 0.001 ↑ 1.0 1 1

CTE Scan on basic_data basic_data_6 (cost=0.00..0.02 rows=1 width=1) (actual time=0.001..0.001 rows=1 loops=1)

22. 0.000 0.000 ↑ 1.0 1 1

CTE Scan on basic_data basic_data_7 (cost=0.00..0.02 rows=1 width=1) (actual time=0.000..0.000 rows=1 loops=1)

23. 0.000 0.000 ↑ 1.0 1 1

CTE Scan on basic_data basic_data_8 (cost=0.00..0.02 rows=1 width=516) (actual time=0.000..0.000 rows=1 loops=1)

24. 0.075 0.075 ↑ 1.0 1 1

CTE Scan on basic_data basic_data_9 (cost=0.00..0.02 rows=1 width=4) (actual time=0.059..0.075 rows=1 loops=1)

25. 0.872 44.230 ↓ 711.0 711 1

Nested Loop Left Join (cost=12.60..918.80 rows=1 width=989) (actual time=0.596..44.230 rows=711 loops=1)

26. 1.269 41.225 ↓ 711.0 711 1

Nested Loop Left Join (cost=12.32..918.06 rows=1 width=916) (actual time=0.591..41.225 rows=711 loops=1)

27. 1.210 37.829 ↓ 709.0 709 1

Nested Loop Left Join (cost=12.03..917.35 rows=1 width=812) (actual time=0.584..37.829 rows=709 loops=1)

28. 0.837 33.783 ↓ 709.0 709 1

Nested Loop (cost=11.61..908.89 rows=1 width=808) (actual time=0.575..33.783 rows=709 loops=1)

29. 1.144 31.528 ↓ 709.0 709 1

Nested Loop (cost=11.32..908.42 rows=1 width=804) (actual time=0.571..31.528 rows=709 loops=1)

30. 1.097 28.257 ↓ 709.0 709 1

Nested Loop (cost=10.90..900.10 rows=1 width=807) (actual time=0.564..28.257 rows=709 loops=1)

31. 0.955 25.021 ↓ 713.0 713 1

Nested Loop (cost=10.62..893.63 rows=1 width=704) (actual time=0.558..25.021 rows=713 loops=1)

  • Join Filter: (ca.restaurantid = brandrestaurant.restaurantid)
32. 1.284 21.927 ↓ 356.5 713 1

Nested Loop (cost=10.33..890.66 rows=2 width=688) (actual time=0.550..21.927 rows=713 loops=1)

  • Join Filter: (ca.restaurantid = sl.referenceid)
33. 1.531 18.504 ↓ 142.6 713 1

Nested Loop (cost=10.04..884.35 rows=5 width=665) (actual time=0.541..18.504 rows=713 loops=1)

34. 5.900 14.834 ↓ 47.5 713 1

Nested Loop (cost=9.76..799.31 rows=15 width=484) (actual time=0.531..14.834 rows=713 loops=1)

  • Join Filter: (ca.deliverytime = tdt.value)
  • Rows Removed by Join Filter: 19993
35. 4.320 4.650 ↓ 11.0 714 1

Bitmap Heap Scan on tgb_coveragepolygon ca (cost=9.76..790.19 rows=65 width=48) (actual time=0.496..4.650 rows=714 loops=1)

  • Recheck Cond: ((polygongeo ~ '0101000020E6100000915F3FC406FF4740D7DCD1FF72553D40'::geometry) AND (restaurantstatus <> 3))
  • Filter: _st_contains(polygongeo, '0101000020E6100000915F3FC406FF4740D7DCD1FF72553D40'::geometry)
  • Rows Removed by Filter: 654
  • Heap Blocks: exact=1208
36. 0.330 0.330 ↓ 7.0 1,368 1

Bitmap Index Scan on tgb_coveragepolygon_polygongeo_idx (cost=0.00..9.75 rows=195 width=0) (actual time=0.330..0.330 rows=1,368 loops=1)

  • Index Cond: (polygongeo ~ '0101000020E6100000915F3FC406FF4740D7DCD1FF72553D40'::geometry)
37. 4.257 4.284 ↓ 3.6 29 714

Materialize (cost=0.00..1.34 rows=8 width=438) (actual time=0.000..0.006 rows=29 loops=714)

38. 0.027 0.027 ↓ 3.6 29 1

Seq Scan on tlb_deliverytimes tdt (cost=0.00..1.30 rows=8 width=438) (actual time=0.004..0.027 rows=29 loops=1)

  • Filter: ((NOT isdeleted) AND (NOT status))
  • Rows Removed by Filter: 1
39. 2.139 2.139 ↑ 1.0 1 713

Index Scan using mwq_restaurant_pkey on mwq_restaurant r (cost=0.28..5.66 rows=1 width=181) (actual time=0.003..0.003 rows=1 loops=713)

  • Index Cond: (id = ca.restaurantid)
  • Filter: ((NOT isdeleted) AND (NOT isdeleted) AND (status <> 3) AND (status <> 3))
40. 2.139 2.139 ↑ 1.0 1 713

Index Scan using tlb_slug_referenceid_idx on tlb_slug sl (cost=0.29..1.25 rows=1 width=23) (actual time=0.003..0.003 rows=1 loops=713)

  • Index Cond: (referenceid = r.id)
  • Filter: ((NOT isdeleted) AND (typeid = 1) AND (brandtype = 1))
  • Rows Removed by Filter: 1
41. 2.139 2.139 ↑ 1.0 1 713

Index Scan using tlb_restaurantbrand_resttid_brndid_idx on tlb_restaurant_brand brandrestaurant (cost=0.29..1.47 rows=1 width=24) (actual time=0.003..0.003 rows=1 loops=713)

  • Index Cond: ((restaurantid = sl.referenceid) AND (brandtype = 1))
  • Filter: (isactive AND (NOT isdeleted))
42. 2.139 2.139 ↑ 1.0 1 713

Index Scan using mwq_branch_pkey on mwq_branch b (cost=0.29..6.46 rows=1 width=107) (actual time=0.003..0.003 rows=1 loops=713)

  • Index Cond: (id = ca.branchid)
  • Filter: ((NOT isdeleted) AND (status <> 3))
  • Rows Removed by Filter: 0
43. 2.127 2.127 ↑ 1.0 1 709

Index Scan using tlb_restaurant_timingstatus_pkey on tlb_coveragepolygon_timingstatus cpt (cost=0.42..8.32 rows=1 width=5) (actual time=0.003..0.003 rows=1 loops=709)

  • Index Cond: (coveragepolygonid = ca.id)
44. 1.418 1.418 ↑ 1.0 1 709

Index Scan using mwq_area_pkey on mwq_area a (cost=0.28..0.46 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=709)

  • Index Cond: (id = b.areaid)
45. 2.836 2.836 ↑ 1.0 1 709

Index Scan using "tlb_RestLstDynmc_restid_areaid_brndtyp_idx" on tlb_restaurantlistdynamic rld (cost=0.42..8.44 rows=1 width=20) (actual time=0.004..0.004 rows=1 loops=709)

  • Index Cond: ((restid = ca.restaurantid) AND (areaid = ca.areaid) AND (brandtype = 1))
46. 2.127 2.127 ↑ 1.0 1 709

Index Scan using tlb_branchdetails_branchid_idx on tlb_branch_details bd (cost=0.29..0.70 rows=1 width=108) (actual time=0.003..0.003 rows=1 loops=709)

  • Index Cond: ((b.id = branchid) AND (brandtype = 1))
47. 2.133 2.133 ↑ 1.0 1 711

Index Scan using "tlb_CommonRestuarantFields_restid_idx" on tlb_commonrestuarantfields cr (cost=0.28..0.73 rows=1 width=77) (actual time=0.002..0.003 rows=1 loops=711)

  • Index Cond: (r.id = restaurantid)
48. 1.422 1.422 ↓ 0.0 0 711

Index Scan using "tlb_Sponsored_Restaurant_rest_area_brnd_idx" on tlb_sponsored_restaurant sp (cost=0.28..0.50 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=711)

  • Index Cond: ((r.id = restaurantid) AND (areaid = $13) AND (brandtype = 1))