explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7N9s

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.908 65.263 ↓ 25.1 1,156 1

Nested Loop (cost=3.60..1,893.49 rows=46 width=514) (actual time=0.530..65.263 rows=1,156 loops=1)

  • Join Filter: (ca.vendorid = cpt.vendorid)
2. 1.148 60.887 ↓ 30.4 1,156 1

Nested Loop Left Join (cost=3.19..1,875.46 rows=38 width=501) (actual time=0.510..60.887 rows=1,156 loops=1)

  • Join Filter: (a.cityid = tcp.cityid)
  • Rows Removed by Join Filter: 4
3. 1.513 57.427 ↓ 30.4 1,156 1

Nested Loop (cost=2.90..1,862.62 rows=38 width=499) (actual time=0.489..57.427 rows=1,156 loops=1)

4. 0.783 54.758 ↓ 30.4 1,156 1

Nested Loop Left Join (cost=2.61..1,849.76 rows=38 width=495) (actual time=0.471..54.758 rows=1,156 loops=1)

  • Join Filter: (ub.id = cr.upsellingcompanyid)
  • Rows Removed by Join Filter: 1,970
5. 1.847 53.975 ↓ 30.4 1,156 1

Nested Loop (cost=2.61..1,847.62 rows=38 width=490) (actual time=0.460..53.975 rows=1,156 loops=1)

  • Join Filter: (b.restaurantid = cr.restaurantid)
6. 1.402 49.816 ↓ 30.4 1,156 1

Nested Loop (cost=2.32..1,833.77 rows=38 width=427) (actual time=0.441..49.816 rows=1,156 loops=1)

  • Join Filter: (b.restaurantid = sl.referenceid)
7. 1.558 46.102 ↓ 30.4 1,156 1

Nested Loop Left Join (cost=2.03..1,820.88 rows=38 width=408) (actual time=0.423..46.102 rows=1,156 loops=1)

8. 2.023 42.232 ↓ 30.4 1,156 1

Nested Loop (cost=1.74..1,807.52 rows=38 width=383) (actual time=0.406..42.232 rows=1,156 loops=1)

  • Join Filter: (ca.vendorid = bd.branchid)
9. 1.331 37.897 ↓ 30.4 1,156 1

Nested Loop (cost=1.45..1,791.27 rows=38 width=329) (actual time=0.387..37.897 rows=1,156 loops=1)

10. 1.609 34.254 ↓ 30.4 1,156 1

Nested Loop (cost=1.16..1,718.63 rows=38 width=293) (actual time=0.370..34.254 rows=1,156 loops=1)

11. 2.217 30.333 ↓ 28.2 1,156 1

Nested Loop (cost=0.87..1,703.19 rows=41 width=281) (actual time=0.357..30.333 rows=1,156 loops=1)

12. 0.994 25.714 ↓ 13.6 1,201 1

Nested Loop (cost=0.58..1,655.27 rows=88 width=154) (actual time=0.342..25.714 rows=1,201 loops=1)

13. 20.568 20.568 ↓ 4.8 1,384 1

Index Scan using tlb_vendor_deliveryarea_polygon_deliveryareapolygon_idx on tlb_vendor_deliveryarea_polygon ca (cost=0.29..1,092.53 rows=286 width=55) (actual time=0.330..20.568 rows=1,384 loops=1)

  • Index Cond: (deliveryareapolygon ~ '0101000020E610000063B48EAA26A64B4018963FDF16383940'::geometry)
  • Filter: ((NOT isdeleted) AND _st_contains(deliveryareapolygon, '0101000020E610000063B48EAA26A64B4018963FDF16383940'::geometry))
  • Rows Removed by Filter: 1,707
14. 4.152 4.152 ↑ 1.0 1 1,384

Index Scan using mwq_branch_pkey on mwq_branch b (cost=0.29..1.97 rows=1 width=99) (actual time=0.003..0.003 rows=1 loops=1,384)

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

Index Scan using mwq_restaurant_pkey on mwq_restaurant r (cost=0.29..0.54 rows=1 width=127) (actual time=0.002..0.002 rows=1 loops=1,201)

  • Index Cond: (id = b.restaurantid)
  • Filter: ((NOT isdeleted) AND (status = ANY ('{0,1,2}'::integer[])))
  • Rows Removed by Filter: 0
16. 2.312 2.312 ↑ 1.0 1 1,156

Index Scan using tlb_restaurant_brand_restaurantid_idx on tlb_restaurant_brand br (cost=0.29..0.37 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=1,156)

  • Index Cond: (restaurantid = b.restaurantid)
  • Filter: (isactive AND (NOT isdeleted))
17. 2.312 2.312 ↑ 1.0 1 1,156

Index Scan using tlb_vendor_deliveryarea_pk on tlb_vendor_deliveryarea vda (cost=0.29..1.91 rows=1 width=52) (actual time=0.002..0.002 rows=1 loops=1,156)

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

Index Scan using tlb_branch_details_branchid_idx on tlb_branch_details bd (cost=0.29..0.42 rows=1 width=54) (actual time=0.002..0.002 rows=1 loops=1,156)

  • Index Cond: (branchid = b.id)
19. 2.312 2.312 ↑ 1.0 1 1,156

Index Scan using tlb_vendor_dynamicrank_vendorid_idx on tlb_vendor_dynamicrank vdr (cost=0.29..0.35 rows=1 width=29) (actual time=0.002..0.002 rows=1 loops=1,156)

  • Index Cond: (b.id = vendorid)
20. 2.312 2.312 ↑ 1.0 1 1,156

Index Scan using tlb_slug_referenceid_idx on tlb_slug sl (cost=0.29..0.33 rows=1 width=19) (actual time=0.002..0.002 rows=1 loops=1,156)

  • Index Cond: (referenceid = br.restaurantid)
  • Filter: ((NOT isdeleted) AND (typeid = 1))
21. 2.312 2.312 ↑ 1.0 1 1,156

Index Scan using "tlb_CommonRestuarantFields_restid_idx" on tlb_commonrestuarantfields cr (cost=0.29..0.35 rows=1 width=79) (actual time=0.002..0.002 rows=1 loops=1,156)

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

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

23. 0.004 0.004 ↑ 1.0 2 1

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

24. 1.156 1.156 ↑ 1.0 1 1,156

Index Scan using mwq_area_pkey on mwq_area a (cost=0.29..0.34 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=1,156)

  • Index Cond: (id = b.areaid)
25. 2.312 2.312 ↑ 1.0 1 1,156

Index Scan using tlb_chain_pricetags_un on tlb_chain_pricetags tcp (cost=0.29..0.33 rows=1 width=10) (actual time=0.002..0.002 rows=1 loops=1,156)

  • Index Cond: (r.id = chainid)
  • Filter: (NOT isdeleted)
  • Rows Removed by Filter: 0
26. 3.468 3.468 ↑ 1.0 1 1,156

Index Scan using tlb_vendor_timingstatus_vendorid_idx on tlb_vendor_timingstatus cpt (cost=0.42..0.46 rows=1 width=5) (actual time=0.003..0.003 rows=1 loops=1,156)

  • Index Cond: (vendorid = bd.branchid)
Planning time : 8.721 ms
Execution time : 65.614 ms