explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tTMB

Settings
# exclusive inclusive rows x rows loops node
1. 5.645 60.044 ↓ 699.0 699 1

Nested Loop Left Join (cost=24.65..68.22 rows=1 width=1,515) (actual time=0.517..60.044 rows=699 loops=1)

2.          

CTE basic_data

3. 0.006 0.116 ↑ 1.0 1 1

Nested Loop (cost=0.72..21.05 rows=1 width=532) (actual time=0.095..0.116 rows=1 loops=1)

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

Nested Loop (cost=0.72..19.25 rows=1 width=535) (actual time=0.085..0.099 rows=1 loops=1)

  • Join Filter: (ct.countryid = fc.countryid)
  • Rows Removed by Join Filter: 6
5. 0.003 0.079 ↑ 1.0 1 1

Nested Loop (cost=0.72..17.46 rows=1 width=530) (actual time=0.072..0.079 rows=1 loops=1)

6. 0.001 0.070 ↑ 1.0 1 1

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

7. 0.003 0.066 ↑ 1.0 1 1

Nested Loop (cost=0.43..16.72 rows=1 width=10) (actual time=0.061..0.066 rows=1 loops=1)

8. 0.057 0.057 ↑ 1.0 1 1

Index Scan using mwq_areapolygons_polygongeo on mwq_areapolygons ap (cost=0.14..8.41 rows=1 width=4) (actual time=0.053..0.057 rows=1 loops=1)

  • Index Cond: (polygongeo && '0101000020E6100000915F3FC406FF4740D7DCD1FF72553D40'::geometry)
  • Filter: _st_intersects(polygongeo, '0101000020E6100000915F3FC406FF4740D7DCD1FF72553D40'::geometry)
  • Rows Removed by Filter: 1
9. 0.006 0.006 ↑ 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.006..0.006 rows=1 loops=1)

  • Index Cond: (id = ap.id)
10. 0.003 0.003 ↑ 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.003..0.003 rows=1 loops=1)

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

Index Scan using tgb_countrysettings_pkey on tgb_countrysettings cs (cost=0.14..0.55 rows=1 width=520) (actual time=0.005..0.006 rows=1 loops=1)

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

Seq Scan on tgb_featurecountry fc (cost=0.00..1.70 rows=7 width=5) (actual time=0.011..0.018 rows=7 loops=1)

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

Seq Scan on tgb_featurecountry fc2 (cost=0.00..1.70 rows=7 width=5) (actual time=0.004..0.011 rows=7 loops=1)

  • Filter: (featureid = 1)
  • Rows Removed by Filter: 49
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.001 0.001 ↑ 1.0 1 1

CTE Scan on basic_data basic_data_2 (cost=0.00..0.02 rows=1 width=1) (actual time=0.001..0.001 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.001 0.001 ↑ 1.0 1 1

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

20. 0.000 0.000 ↑ 1.0 1 1

CTE Scan on basic_data basic_data_5 (cost=0.00..0.02 rows=1 width=4) (actual time=0.000..0.000 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.120 0.120 ↑ 1.0 1 1

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

25. 1.098 52.876 ↓ 699.0 699 1

Nested Loop Left Join (cost=3.13..46.49 rows=1 width=1,000) (actual time=0.304..52.876 rows=699 loops=1)

26. 1.457 49.681 ↓ 699.0 699 1

Nested Loop Left Join (cost=2.84..45.92 rows=1 width=927) (actual time=0.291..49.681 rows=699 loops=1)

27. 0.829 46.127 ↓ 699.0 699 1

Nested Loop Left Join (cost=2.55..45.45 rows=1 width=823) (actual time=0.277..46.127 rows=699 loops=1)

28. 5.761 41.104 ↓ 699.0 699 1

Nested Loop (cost=2.13..37.00 rows=1 width=819) (actual time=0.244..41.104 rows=699 loops=1)

  • Join Filter: (ca.deliverytime = tdt.value)
  • Rows Removed by Join Filter: 19572
29. 1.145 28.353 ↓ 699.0 699 1

Nested Loop (cost=2.13..35.60 rows=1 width=383) (actual time=0.231..28.353 rows=699 loops=1)

30. 1.007 25.810 ↓ 699.0 699 1

Nested Loop (cost=1.85..35.20 rows=1 width=379) (actual time=0.226..25.810 rows=699 loops=1)

31. 0.923 19.211 ↓ 699.0 699 1

Nested Loop (cost=1.43..26.75 rows=1 width=364) (actual time=0.200..19.211 rows=699 loops=1)

  • Join Filter: (ca.restaurantid = sl.referenceid)
32. 1.622 15.492 ↓ 699.0 699 1

Nested Loop (cost=1.14..26.18 rows=1 width=349) (actual time=0.177..15.492 rows=699 loops=1)

  • Join Filter: (ca.restaurantid = r.id)
33. 1.294 11.074 ↓ 699.0 699 1

Nested Loop (cost=0.85..25.18 rows=1 width=171) (actual time=0.156..11.074 rows=699 loops=1)

34. 1.280 7.683 ↓ 699.0 699 1

Nested Loop (cost=0.57..16.87 rows=1 width=147) (actual time=0.143..7.683 rows=699 loops=1)

35. 3.563 3.563 ↓ 710.0 710 1

Index Scan using tgb_coveragepolygon_polygongeo on tgb_coveragepolygon ca (cost=0.28..8.55 rows=1 width=44) (actual time=0.125..3.563 rows=710 loops=1)

  • Index Cond: (polygongeo && '0101000020E6100000915F3FC406FF4740D7DCD1FF72553D40'::geometry)
  • Filter: ((restaurantstatus <> 3) AND _st_intersects(polygongeo, '0101000020E6100000915F3FC406FF4740D7DCD1FF72553D40'::geometry))
  • Rows Removed by Filter: 1316
36. 2.840 2.840 ↑ 1.0 1 710

Index Scan using mwq_branch_pkey on mwq_branch b (cost=0.29..8.30 rows=1 width=107) (actual time=0.004..0.004 rows=1 loops=710)

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

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

  • Index Cond: ((restaurantid = ca.restaurantid) AND (brandtype = 1))
  • Filter: (isactive AND (NOT isdeleted))
38. 2.796 2.796 ↑ 1.0 1 699

Index Scan using mwq_restaurant_pkey on mwq_restaurant r (cost=0.29..0.98 rows=1 width=178) (actual time=0.004..0.004 rows=1 loops=699)

  • Index Cond: (id = brandrestaurant.restaurantid)
  • Filter: ((NOT isdeleted) AND (NOT isdeleted) AND (status <> 3) AND (status <> 3))
39. 2.796 2.796 ↑ 1.0 1 699

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

  • Index Cond: (referenceid = brandrestaurant.restaurantid)
  • Filter: ((NOT isdeleted) AND (typeid = 1) AND (brandtype = 1))
  • Rows Removed by Filter: 1
40. 5.592 5.592 ↑ 1.0 1 699

Index Scan using tgb_coveragepolygon_additional_pkey on tgb_coveragepolygon_additional cpa (cost=0.42..8.44 rows=1 width=23) (actual time=0.008..0.008 rows=1 loops=699)

  • Index Cond: (coveragepolygonid = ca.id)
41. 1.398 1.398 ↑ 1.0 1 699

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

  • Index Cond: (id = b.areaid)
42. 6.990 6.990 ↓ 3.6 29 699

Seq Scan on tlb_deliverytimes tdt (cost=0.00..1.30 rows=8 width=438) (actual time=0.001..0.010 rows=29 loops=699)

  • Filter: ((NOT isdeleted) AND (NOT status))
  • Rows Removed by Filter: 1
43. 4.194 4.194 ↑ 1.0 1 699

Index Scan using "tlb_RestLstDynmc_restid_areaid_brndtyp_idx" on tlb_restaurantlistdynamic rld (cost=0.42..8.45 rows=1 width=20) (actual time=0.005..0.006 rows=1 loops=699)

  • Index Cond: ((restid = ca.restaurantid) AND (areaid = ca.areaid) AND (brandtype = 1))
44. 2.097 2.097 ↑ 1.0 1 699

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

  • Index Cond: ((b.id = branchid) AND (brandtype = 1))
45. 2.097 2.097 ↑ 1.0 1 699

Index Scan using "tlb_CommonRestuarantFields_restid_idx" on tlb_commonrestuarantfields cr (cost=0.29..0.56 rows=1 width=77) (actual time=0.002..0.003 rows=1 loops=699)

  • Index Cond: (r.id = restaurantid)
46. 1.398 1.398 ↓ 0.0 0 699

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

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