explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DZ1z

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 1.832 131.623 ↓ 31.2 1,153 1

Nested Loop Left Join (cost=49.95..5,758.68 rows=37 width=514) (actual time=3.460..131.623 rows=1,153 loops=1)

  • Join Filter: (a.cityid = tcp.cityid)
  • Rows Removed by Join Filter: 4
2. 1.755 125.179 ↓ 31.2 1,153 1

Nested Loop (cost=49.67..5,743.72 rows=37 width=492) (actual time=3.437..125.179 rows=1,153 loops=1)

3. 2.765 121.118 ↓ 31.2 1,153 1

Nested Loop (cost=49.38..5,727.21 rows=37 width=488) (actual time=3.421..121.118 rows=1,153 loops=1)

  • Join Filter: (ca.vendorid = cpt.vendorid)
4. 1.206 112.588 ↓ 31.2 1,153 1

Nested Loop Left Join (cost=49.09..5,713.14 rows=37 width=495) (actual time=3.398..112.588 rows=1,153 loops=1)

  • Join Filter: (ub.id = cr.upsellingcompanyid)
  • Rows Removed by Join Filter: 1,966
5. 1.730 111.382 ↓ 31.2 1,153 1

Nested Loop (cost=49.09..5,711.03 rows=37 width=490) (actual time=3.384..111.382 rows=1,153 loops=1)

  • Join Filter: (b.restaurantid = cr.restaurantid)
6. 1.792 98.122 ↓ 31.2 1,153 1

Nested Loop Left Join (cost=48.80..5,692.82 rows=37 width=427) (actual time=3.362..98.122 rows=1,153 loops=1)

7. 2.123 91.718 ↓ 31.2 1,153 1

Nested Loop (cost=48.51..5,675.25 rows=37 width=402) (actual time=3.340..91.718 rows=1,153 loops=1)

  • Join Filter: (ca.vendorid = bd.branchid)
8. 2.886 67.688 ↓ 31.2 1,153 1

Nested Loop (cost=48.22..5,648.67 rows=37 width=348) (actual time=3.315..67.688 rows=1,153 loops=1)

9. 3.301 60.190 ↓ 31.2 1,153 1

Nested Loop (cost=47.92..5,401.82 rows=37 width=312) (actual time=3.282..60.190 rows=1,153 loops=1)

  • Join Filter: (b.restaurantid = br.restaurantid)
10. 2.442 52.277 ↓ 28.1 1,153 1

Nested Loop (cost=47.63..5,384.08 rows=41 width=300) (actual time=3.262..52.277 rows=1,153 loops=1)

  • Join Filter: (b.restaurantid = r.id)
11. 1.276 45.043 ↓ 13.8 1,198 1

Nested Loop (cost=47.34..5,313.58 rows=87 width=173) (actual time=3.239..45.043 rows=1,198 loops=1)

12. 2.145 38.975 ↓ 13.8 1,198 1

Nested Loop (cost=47.05..5,275.43 rows=87 width=154) (actual time=3.224..38.975 rows=1,198 loops=1)

13. 27.154 29.955 ↓ 4.8 1,375 1

Bitmap Heap Scan on tlb_vendor_deliveryarea_polygon ca (cost=46.76..3,410.01 rows=285 width=55) (actual time=3.172..29.955 rows=1,375 loops=1)

  • Recheck Cond: (deliveryareapolygon ~ '0101000020E610000063B48EAA26A64B4018963FDF16383940'::geometry)
  • Filter: ((NOT isdeleted) AND _st_contains(deliveryareapolygon, '0101000020E610000063B48EAA26A64B4018963FDF16383940'::geometry))
  • Rows Removed by Filter: 1,699
  • Heap Blocks: exact=2,815
14. 2.801 2.801 ↓ 3.6 3,078 1

Bitmap Index Scan on tlb_vendor_deliveryarea_polygon_deliveryareapolygon_idx (cost=0.00..46.69 rows=854 width=0) (actual time=2.801..2.801 rows=3,078 loops=1)

  • Index Cond: (deliveryareapolygon ~ '0101000020E610000063B48EAA26A64B4018963FDF16383940'::geometry)
15. 6.875 6.875 ↑ 1.0 1 1,375

Index Scan using mwq_branch_pkey on mwq_branch b (cost=0.29..6.55 rows=1 width=99) (actual time=0.005..0.005 rows=1 loops=1,375)

  • Index Cond: (id = ca.vendorid)
  • Filter: ((NOT isdeleted) AND istalabatgo AND (status = ANY ('{0,1,2}'::integer[])))
  • Rows Removed by Filter: 0
16. 4.792 4.792 ↑ 1.0 1 1,198

Index Scan using tlb_slug_referenceid_idx on tlb_slug sl (cost=0.29..0.43 rows=1 width=19) (actual time=0.004..0.004 rows=1 loops=1,198)

  • Index Cond: (referenceid = b.restaurantid)
  • Filter: ((NOT isdeleted) AND (typeid = 1))
17. 4.792 4.792 ↑ 1.0 1 1,198

Index Scan using mwq_restaurant_pkey on mwq_restaurant r (cost=0.29..0.80 rows=1 width=127) (actual time=0.004..0.004 rows=1 loops=1,198)

  • Index Cond: (id = sl.referenceid)
  • Filter: ((NOT isdeleted) AND (status = ANY ('{0,1,2}'::integer[])))
  • Rows Removed by Filter: 0
18. 4.612 4.612 ↑ 1.0 1 1,153

Index Scan using tlb_restaurant_brand_restaurantid_idx on tlb_restaurant_brand br (cost=0.29..0.42 rows=1 width=12) (actual time=0.004..0.004 rows=1 loops=1,153)

  • Index Cond: (restaurantid = sl.referenceid)
  • Filter: (isactive AND (NOT isdeleted))
19. 4.612 4.612 ↑ 1.0 1 1,153

Index Scan using tlb_vendor_deliveryarea_pk on tlb_vendor_deliveryarea vda (cost=0.29..6.67 rows=1 width=52) (actual time=0.004..0.004 rows=1 loops=1,153)

  • Index Cond: (id = ca.vendordeliveryareaid)
  • Filter: (deliveryareastatus = ANY ('{0,1,2}'::integer[]))
20. 21.907 21.907 ↑ 1.0 1 1,153

Index Scan using tlb_branch_details_branchid_idx on tlb_branch_details bd (cost=0.29..0.71 rows=1 width=54) (actual time=0.018..0.019 rows=1 loops=1,153)

  • Index Cond: (branchid = b.id)
21. 4.612 4.612 ↑ 1.0 1 1,153

Index Scan using tlb_vendor_dynamicrank_vendorid_idx on tlb_vendor_dynamicrank vdr (cost=0.29..0.47 rows=1 width=29) (actual time=0.004..0.004 rows=1 loops=1,153)

  • Index Cond: (b.id = vendorid)
22. 11.530 11.530 ↑ 1.0 1 1,153

Index Scan using "tlb_CommonRestuarantFields_restid_idx" on tlb_commonrestuarantfields cr (cost=0.29..0.48 rows=1 width=79) (actual time=0.009..0.010 rows=1 loops=1,153)

  • Index Cond: (restaurantid = sl.referenceid)
23. 0.000 0.000 ↑ 1.0 2 1,153

Materialize (cost=0.00..1.03 rows=2 width=9) (actual time=0.000..0.000 rows=2 loops=1,153)

24. 0.005 0.005 ↑ 1.0 2 1

Seq Scan on tgb_upsellingcompany ub (cost=0.00..1.02 rows=2 width=9) (actual time=0.004..0.005 rows=2 loops=1)

25. 5.765 5.765 ↑ 1.0 1 1,153

Index Scan using tlb_vendor_timingstatus_vendorid_idx on tlb_vendor_timingstatus cpt (cost=0.29..0.37 rows=1 width=5) (actual time=0.005..0.005 rows=1 loops=1,153)

  • Index Cond: (vendorid = bd.branchid)
26. 2.306 2.306 ↑ 1.0 1 1,153

Index Scan using mwq_area_pkey on mwq_area a (cost=0.29..0.45 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=1,153)

  • Index Cond: (id = b.areaid)
27. 4.612 4.612 ↑ 1.0 1 1,153

Index Scan using tlb_chain_pricetags_un on tlb_chain_pricetags tcp (cost=0.29..0.39 rows=1 width=10) (actual time=0.004..0.004 rows=1 loops=1,153)

  • Index Cond: (r.id = chainid)
  • Filter: (NOT isdeleted)
  • Rows Removed by Filter: 0
Planning time : 15.815 ms
Execution time : 201.697 ms