explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 16GR : Optimization for: Optimization for: plan #DZ1z; plan #UBIj

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 1.956 75.542 ↓ 26.8 1,153 1

Nested Loop (cost=49.95..5,768.37 rows=43 width=557) (actual time=2.277..75.542 rows=1,153 loops=1)

  • Join Filter: (ca.vendorid = cpt.vendorid)
2. 1.387 71.280 ↓ 30.3 1,153 1

Nested Loop Left Join (cost=49.66..5,753.70 rows=38 width=534) (actual time=2.256..71.280 rows=1,153 loops=1)

  • Join Filter: (a.cityid = tcp.cityid)
  • Rows Removed by Join Filter: 4
3. 1.761 67.587 ↓ 30.3 1,153 1

Nested Loop (cost=49.37..5,738.53 rows=38 width=532) (actual time=2.238..67.587 rows=1,153 loops=1)

4. 0.893 64.673 ↓ 30.3 1,153 1

Nested Loop Left Join (cost=49.09..5,721.57 rows=38 width=528) (actual time=2.224..64.673 rows=1,153 loops=1)

  • Join Filter: (ub.id = cr.upsellingcompanyid)
  • Rows Removed by Join Filter: 1,966
5. 1.098 63.780 ↓ 30.3 1,153 1

Nested Loop (cost=49.09..5,719.43 rows=38 width=523) (actual time=2.213..63.780 rows=1,153 loops=1)

  • Join Filter: (b.restaurantid = cr.restaurantid)
6. 0.997 56.917 ↓ 30.3 1,153 1

Nested Loop Left Join (cost=48.80..5,700.73 rows=38 width=433) (actual time=2.193..56.917 rows=1,153 loops=1)

7. 1.670 52.461 ↓ 30.3 1,153 1

Nested Loop (cost=48.51..5,682.68 rows=38 width=408) (actual time=2.175..52.461 rows=1,153 loops=1)

  • Join Filter: (ca.vendorid = bd.branchid)
8. 1.273 43.873 ↓ 30.3 1,153 1

Nested Loop (cost=48.22..5,655.35 rows=38 width=348) (actual time=2.155..43.873 rows=1,153 loops=1)

9. 1.204 39.141 ↓ 30.3 1,153 1

Nested Loop (cost=47.92..5,401.83 rows=38 width=312) (actual time=2.137..39.141 rows=1,153 loops=1)

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

Nested Loop (cost=47.63..5,384.09 rows=41 width=300) (actual time=2.121..34.478 rows=1,153 loops=1)

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

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

12. 1.535 25.537 ↓ 13.8 1,198 1

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

13. 18.144 19.874 ↓ 4.8 1,376 1

Bitmap Heap Scan on tlb_vendor_deliveryarea_polygon ca (cost=46.76..3,410.01 rows=285 width=55) (actual time=2.054..19.874 rows=1,376 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,821
14. 1.730 1.730 ↓ 3.6 3,084 1

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

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

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

  • Index Cond: (id = ca.vendorid)
  • Filter: ((NOT isdeleted) AND istalabatgo AND (status = ANY ('{0,1,2}'::integer[])))
  • Rows Removed by Filter: 0
16. 2.396 2.396 ↑ 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.002..0.002 rows=1 loops=1,198)

  • Index Cond: (referenceid = b.restaurantid)
  • Filter: ((NOT isdeleted) AND (typeid = 1))
17. 3.594 3.594 ↑ 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.003..0.003 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. 3.459 3.459 ↑ 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.003..0.003 rows=1 loops=1,153)

  • Index Cond: (restaurantid = sl.referenceid)
  • Filter: (isactive AND (NOT isdeleted))
19. 3.459 3.459 ↑ 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.003..0.003 rows=1 loops=1,153)

  • Index Cond: (id = ca.vendordeliveryareaid)
  • Filter: (deliveryareastatus = ANY ('{0,1,2}'::integer[]))
20. 6.918 6.918 ↑ 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=60) (actual time=0.006..0.006 rows=1 loops=1,153)

  • Index Cond: (branchid = b.id)
  • Filter: (hideinlisting IS NOT TRUE)
21. 3.459 3.459 ↑ 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.003..0.003 rows=1 loops=1,153)

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

Index Scan using "tlb_CommonRestuarantFields_restid_idx" on tlb_commonrestuarantfields cr (cost=0.29..0.48 rows=1 width=106) (actual time=0.004..0.005 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.003 0.003 ↑ 1.0 2 1

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

25. 1.153 1.153 ↑ 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.001..0.001 rows=1 loops=1,153)

  • Index Cond: (id = b.areaid)
26. 2.306 2.306 ↑ 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.002..0.002 rows=1 loops=1,153)

  • Index Cond: (r.id = chainid)
  • Filter: (NOT isdeleted)
  • Rows Removed by Filter: 0
27. 2.306 2.306 ↑ 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=15) (actual time=0.002..0.002 rows=1 loops=1,153)

  • Index Cond: (vendorid = bd.branchid)
Planning time : 10.369 ms
Execution time : 79.300 ms