explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Uo9C

Settings
# exclusive inclusive rows x rows loops node
1. 4.658 39.207 ↓ 698.0 698 1

Nested Loop Left Join (cost=24.65..57.70 rows=1 width=1,265) (actual time=0.770..39.207 rows=698 loops=1)

2.          

CTE basic_data

3. 0.007 0.091 ↑ 1.0 1 1

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

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

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

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

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

6. 0.003 0.051 ↑ 1.0 1 1

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

7. 0.002 0.047 ↑ 1.0 1 1

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

8. 0.041 0.041 ↑ 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.039..0.041 rows=1 loops=1)

  • Index Cond: (polygongeo && '0101000020E6100000915F3FC406FF4740D7DCD1FF72553D40'::geometry)
  • Filter: _st_intersects(polygongeo, '0101000020E6100000915F3FC406FF4740D7DCD1FF72553D40'::geometry)
  • Rows Removed by Filter: 1
9. 0.004 0.004 ↑ 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.004 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.14..0.55 rows=1 width=520) (actual time=0.004..0.005 rows=1 loops=1)

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

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

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

Seq Scan on tgb_featurecountry fc2 (cost=0.00..1.70 rows=7 width=5) (actual time=0.005..0.009 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.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.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.000 0.000 ↑ 1.0 1 1

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

22. 0.001 0.001 ↑ 1.0 1 1

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

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

25. 0.963 33.053 ↓ 698.0 698 1

Nested Loop (cost=3.13..35.96 rows=1 width=564) (actual time=0.626..33.053 rows=698 loops=1)

  • Join Filter: (ca.restaurantid = cr.restaurantid)
26. 1.133 29.996 ↓ 698.0 698 1

Nested Loop (cost=2.84..35.64 rows=1 width=507) (actual time=0.618..29.996 rows=698 loops=1)

  • Join Filter: (ca.branchid = bd.branchid)
27. 0.903 26.766 ↓ 699.0 699 1

Nested Loop (cost=2.55..35.18 rows=1 width=407) (actual time=0.607..26.766 rows=699 loops=1)

28. 0.991 24.465 ↓ 699.0 699 1

Nested Loop (cost=2.27..34.78 rows=1 width=403) (actual time=0.603..24.465 rows=699 loops=1)

29. 1.171 20.678 ↓ 699.0 699 1

Nested Loop (cost=1.85..26.33 rows=1 width=388) (actual time=0.595..20.678 rows=699 loops=1)

  • Join Filter: (ca.restaurantid = sl.referenceid)
30. 0.983 17.410 ↓ 699.0 699 1

Nested Loop (cost=1.56..25.98 rows=1 width=365) (actual time=0.586..17.410 rows=699 loops=1)

  • Join Filter: (ca.restaurantid = brandrestaurant.restaurantid)
31. 1.588 14.330 ↓ 699.0 699 1

Nested Loop (cost=1.28..25.66 rows=1 width=341) (actual time=0.576..14.330 rows=699 loops=1)

  • Join Filter: (ca.restaurantid = r.id)
32. 1.025 10.645 ↓ 699.0 699 1

Nested Loop (cost=0.99..25.32 rows=1 width=163) (actual time=0.565..10.645 rows=699 loops=1)

33. 1.459 6.824 ↓ 699.0 699 1

Nested Loop (cost=0.57..16.87 rows=1 width=151) (actual time=0.555..6.824 rows=699 loops=1)

34. 3.235 3.235 ↓ 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.542..3.235 rows=710 loops=1)

  • Index Cond: (polygongeo && '0101000020E6100000915F3FC406FF4740D7DCD1FF72553D40'::geometry)
  • Filter: ((restaurantstatus <> 3) AND _st_intersects(polygongeo, '0101000020E6100000915F3FC406FF4740D7DCD1FF72553D40'::geometry))
  • Rows Removed by Filter: 1316
35. 2.130 2.130 ↑ 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.003..0.003 rows=1 loops=710)

  • Index Cond: (id = ca.branchid)
  • Filter: ((NOT isdeleted) AND (status <> 3))
  • Rows Removed by Filter: 0
36. 2.796 2.796 ↑ 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.004..0.004 rows=1 loops=699)

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

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

  • Index Cond: (id = rld.restid)
  • Filter: ((NOT isdeleted) AND (NOT isdeleted) AND (status <> 3) AND (status <> 3))
38. 2.097 2.097 ↑ 1.0 1 699

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

  • Index Cond: ((restaurantid = rld.restid) AND (brandtype = 1))
  • Filter: (isactive AND (NOT isdeleted))
39. 2.097 2.097 ↑ 1.0 1 699

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

  • Index Cond: (referenceid = rld.restid)
  • Filter: ((NOT isdeleted) AND (typeid = 1) AND (brandtype = 1))
  • Rows Removed by Filter: 1
40. 2.796 2.796 ↑ 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.004..0.004 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. 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: ((branchid = b.id) AND (brandtype = 1))
43. 2.094 2.094 ↑ 1.0 1 698

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

  • Index Cond: (restaurantid = rld.restid)
44. 1.396 1.396 ↓ 0.0 0 698

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=698)

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