explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DLhu

Settings
# exclusive inclusive rows x rows loops node
1. 7.176 65.912 ↓ 711.0 711 1

Nested Loop Left Join (cost=34.28..1,268.55 rows=1 width=1,536) (actual time=1.187..65.912 rows=711 loops=1)

2.          

CTE basic_data

3. 0.010 0.123 ↑ 1.0 1 1

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

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

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

  • Join Filter: (ct.countryid = fc.countryid)
5. 0.001 0.082 ↑ 1.0 1 1

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

6. 0.005 0.076 ↑ 1.0 1 1

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

7. 0.003 0.068 ↑ 1.0 1 1

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

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

  • Index Cond: (polygongeo && '0101000020E6100000915F3FC406FF4740D7DCD1FF72553D40'::geometry)
  • Filter: _st_intersects(polygongeo, '0101000020E6100000915F3FC406FF4740D7DCD1FF72553D40'::geometry)
  • Rows Removed by Filter: 1
9. 0.005 0.005 ↑ 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.004..0.005 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.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.014 0.014 ↑ 1.0 1 1

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

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

Seq Scan on tgb_featurecountry fc2 (cost=0.00..1.64 rows=7 width=5) (actual time=0.004..0.011 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.001 0.001 ↑ 1.0 1 1

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

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

19. 0.002 0.002 ↑ 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.002 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.002 0.002 ↑ 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.002 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.128 0.128 ↑ 1.0 1 1

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

25. 1.670 57.179 ↓ 711.0 711 1

Nested Loop Left Join (cost=13.26..1,247.24 rows=1 width=989) (actual time=0.988..57.179 rows=711 loops=1)

26. 1.444 53.376 ↓ 711.0 711 1

Nested Loop Left Join (cost=12.98..1,246.49 rows=1 width=916) (actual time=0.981..53.376 rows=711 loops=1)

27. 1.176 49.096 ↓ 709.0 709 1

Nested Loop Left Join (cost=12.69..1,245.79 rows=1 width=812) (actual time=0.972..49.096 rows=709 loops=1)

28. 1.481 43.666 ↓ 709.0 709 1

Nested Loop (cost=12.27..1,237.33 rows=1 width=808) (actual time=0.958..43.666 rows=709 loops=1)

29. 1.213 40.767 ↓ 709.0 709 1

Nested Loop (cost=11.98..1,236.86 rows=1 width=804) (actual time=0.940..40.767 rows=709 loops=1)

30. 1.085 36.718 ↓ 709.0 709 1

Nested Loop (cost=11.56..1,228.53 rows=1 width=807) (actual time=0.931..36.718 rows=709 loops=1)

31. 1.018 32.781 ↓ 713.0 713 1

Nested Loop (cost=11.28..1,222.07 rows=1 width=704) (actual time=0.921..32.781 rows=713 loops=1)

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

Nested Loop (cost=10.99..1,219.10 rows=2 width=688) (actual time=0.910..28.911 rows=713 loops=1)

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

Nested Loop (cost=10.70..1,212.79 rows=5 width=665) (actual time=0.898..24.585 rows=713 loops=1)

34. 6.997 19.702 ↓ 50.9 713 1

Nested Loop (cost=10.42..1,133.42 rows=14 width=484) (actual time=0.881..19.702 rows=713 loops=1)

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

Bitmap Heap Scan on tgb_coveragepolygon ca (cost=10.42..1,124.30 rows=65 width=48) (actual time=0.776..6.993 rows=714 loops=1)

  • Recheck Cond: (polygongeo ~ '0101000020E6100000915F3FC406FF4740D7DCD1FF72553D40'::geometry)
  • Filter: ((restaurantstatus <> 3) AND _st_contains(polygongeo, '0101000020E6100000915F3FC406FF4740D7DCD1FF72553D40'::geometry))
  • Rows Removed by Filter: 1171
  • Heap Blocks: exact=1617
36. 0.453 0.453 ↓ 6.7 1,885 1

Bitmap Index Scan on tgb_coveragepolygon_polygongeo_idx (cost=0.00..10.41 rows=283 width=0) (actual time=0.453..0.453 rows=1,885 loops=1)

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

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

38. 0.026 0.026 ↓ 3.6 29 1

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

  • Filter: ((NOT isdeleted) AND (NOT status))
  • Rows Removed by Filter: 1
39. 2.852 2.852 ↑ 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.004..0.004 rows=1 loops=713)

  • Index Cond: (id = ca.restaurantid)
  • Filter: ((NOT isdeleted) AND (NOT isdeleted) AND (status <> 3) AND (status <> 3))
40. 2.852 2.852 ↑ 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.004..0.004 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.852 2.852 ↑ 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.004 rows=1 loops=713)

  • Index Cond: ((restaurantid = sl.referenceid) AND (brandtype = 1))
  • Filter: (isactive AND (NOT isdeleted))
42. 2.852 2.852 ↑ 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.004 rows=1 loops=713)

  • Index Cond: (id = ca.branchid)
  • Filter: ((NOT isdeleted) AND (status <> 3))
  • Rows Removed by Filter: 0
43. 2.836 2.836 ↑ 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.004..0.004 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. 4.254 4.254 ↑ 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.005..0.006 rows=1 loops=709)

  • Index Cond: ((restid = ca.restaurantid) AND (areaid = ca.areaid) AND (brandtype = 1))
46. 2.836 2.836 ↑ 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.004..0.004 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.003..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))