explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Ztl2

Settings
# exclusive inclusive rows x rows loops node
1. 1.385 39.904 ↓ 517.0 517 1

Nested Loop (cost=1,102.13..34,817.83 rows=1 width=5,691) (actual time=0.831..39.904 rows=517 loops=1)

2. 1.157 36.968 ↓ 517.0 517 1

Nested Loop (cost=1,101.86..34,809.52 rows=1 width=5,159) (actual time=0.811..36.968 rows=517 loops=1)

  • Join Filter: (ca.vendor_id = cpt.vendor_id)
3. 0.874 33.743 ↓ 517.0 517 1

Nested Loop Left Join (cost=1,101.57..34,809.15 rows=1 width=5,170) (actual time=0.795..33.743 rows=517 loops=1)

4. 1.560 32.352 ↓ 517.0 517 1

Nested Loop (cost=1,101.43..34,808.99 rows=1 width=5,052) (actual time=0.787..32.352 rows=517 loops=1)

  • Join Filter: (ca.vendor_id = bd.branchid)
5. 1.707 27.173 ↓ 517.0 517 1

Nested Loop (cost=1,005.49..34,293.46 rows=1 width=3,467) (actual time=0.774..27.173 rows=517 loops=1)

  • Join Filter: (b.restaurantid = r.id)
6. 1.347 23.390 ↓ 519.0 519 1

Nested Loop (cost=1,005.24..34,292.43 rows=1 width=1,884) (actual time=0.758..23.390 rows=519 loops=1)

  • Join Filter: (b.restaurantid = br.restaurantid)
7. 1.155 19.967 ↓ 519.0 519 1

Nested Loop (cost=1,004.97..34,291.93 rows=1 width=1,872) (actual time=0.737..19.967 rows=519 loops=1)

  • Join Filter: (b.restaurantid = sl.referenceid)
8. 1.458 16.736 ↓ 519.0 519 1

Nested Loop (cost=1,004.69..34,291.48 rows=1 width=1,352) (actual time=0.723..16.736 rows=519 loops=1)

9. 0.000 11.645 ↓ 519.0 519 1

Nested Loop (cost=1,000.27..34,283.04 rows=1 width=1,294) (actual time=0.703..11.645 rows=519 loops=1)

10. 0.000 9.057 ↓ 520.0 520 1

Gather (cost=1,000.00..34,272.45 rows=1 width=104) (actual time=0.676..9.057 rows=520 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
11. 20.860 20.860 ↓ 173.0 173 3

Parallel Seq Scan on tlb_vendordelivery_area ca (cost=0.00..33,272.35 rows=1 width=104) (actual time=0.104..20.860 rows=173 loops=3)

  • Filter: ((NOT isdeleted) AND (coverage_polygon ~ '0101000020E6100000429770E82D0A48405376FA415D4C3D40'::geometry) AND (coveragepolygonstatus = ANY ('{0,1,2}'::integer[])) AND _st_contains(coverage_polygon, '0101000020E6100000429770E82D0A48405376FA415D4C3D40'::geometry))
  • Rows Removed by Filter: 26862
12. 2.600 2.600 ↑ 1.0 1 520

Index Scan using mwq_branch_pkey on mwq_branch b (cost=0.28..8.30 rows=1 width=1,190) (actual time=0.005..0.005 rows=1 loops=520)

  • Index Cond: (id = ca.vendor_id)
  • Filter: ((NOT isdeleted) AND (status = ANY ('{0,1,2}'::integer[])))
13. 1.557 3.633 ↑ 1.0 1 519

Bitmap Heap Scan on tlb_commonrestuarantfields cr (cost=4.42..8.43 rows=1 width=58) (actual time=0.006..0.007 rows=1 loops=519)

  • Recheck Cond: (restaurantid = b.restaurantid)
  • Heap Blocks: exact=519
14. 2.076 2.076 ↑ 1.0 1 519

Bitmap Index Scan on "tlb_CommonRestuarantFields_restid_idx" (cost=0.00..4.42 rows=1 width=0) (actual time=0.004..0.004 rows=1 loops=519)

  • Index Cond: (restaurantid = b.restaurantid)
15. 2.076 2.076 ↑ 1.0 1 519

Index Scan using tlb_slug_referenceid_idx on tlb_slug sl (cost=0.28..0.44 rows=1 width=520) (actual time=0.004..0.004 rows=1 loops=519)

  • Index Cond: (referenceid = cr.restaurantid)
  • Filter: ((NOT isdeleted) AND (typeid = 1))
16. 2.076 2.076 ↑ 1.0 1 519

Index Scan using tlb_restaurant_brand_rest_brand_idx on tlb_restaurant_brand br (cost=0.28..0.49 rows=1 width=12) (actual time=0.004..0.004 rows=1 loops=519)

  • Index Cond: (restaurantid = cr.restaurantid)
  • Filter: (isactive AND (NOT isdeleted))
17. 2.076 2.076 ↑ 1.0 1 519

Index Scan using mwq_restaurant_pkey on mwq_restaurant r (cost=0.25..1.02 rows=1 width=1,599) (actual time=0.004..0.004 rows=1 loops=519)

  • Index Cond: (id = cr.restaurantid)
  • Filter: ((NOT isdeleted) AND (NOT isdeleted) AND (status = ANY ('{0,1,2}'::integer[])))
  • Rows Removed by Filter: 0
18. 1.551 3.619 ↑ 111.0 1 517

Bitmap Heap Scan on tlb_branch_details bd (cost=95.94..514.14 rows=111 width=1,585) (actual time=0.006..0.007 rows=1 loops=517)

  • Recheck Cond: (branchid = b.id)
  • Heap Blocks: exact=517
19. 2.068 2.068 ↑ 111.0 1 517

Bitmap Index Scan on tlb_branch_details_branchid_brndtype_idx (cost=0.00..95.91 rows=111 width=0) (actual time=0.004..0.004 rows=1 loops=517)

  • Index Cond: (branchid = b.id)
20. 0.517 0.517 ↓ 0.0 0 517

Index Scan using tgb_upsellingcompany_pkey on tgb_upsellingcompany ub (cost=0.14..0.16 rows=1 width=122) (actual time=0.001..0.001 rows=0 loops=517)

  • Index Cond: (id = cr.upsellingcompanyid)
21. 2.068 2.068 ↑ 1.0 1 517

Index Scan using tlb_vendor_timingstatus_pkey on tlb_vendor_timingstatus cpt (cost=0.29..0.35 rows=1 width=5) (actual time=0.004..0.004 rows=1 loops=517)

  • Index Cond: (vendor_id = bd.branchid)
22. 1.551 1.551 ↑ 1.0 1 517

Index Scan using mwq_area_pkey on mwq_area a (cost=0.28..8.29 rows=1 width=8) (actual time=0.003..0.003 rows=1 loops=517)

  • Index Cond: (id = b.areaid)
Planning time : 7.355 ms
Execution time : 41.703 ms