explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Mqg2v

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 0.253 ↑ 1.0 1 1

Result (cost=111.18..111.19 rows=1 width=1) (actual time=0.252..0.253 rows=1 loops=1)

2.          

Initplan (for Result)

3. 0.001 0.251 ↓ 0.0 0 1

Nested Loop Semi Join (cost=102.71..111.18 rows=1 width=0) (actual time=0.251..0.251 rows=0 loops=1)

  • Join Filter: (poc.id = poc_1.id)
4. 0.000 0.250 ↓ 0.0 0 1

Nested Loop (cost=102.02..110.06 rows=1 width=12) (actual time=0.250..0.250 rows=0 loops=1)

  • Join Filter: (inventory_item.poc_id = poc.id)
5. 0.004 0.234 ↑ 1.0 1 1

HashAggregate (cost=101.60..101.61 rows=1 width=8) (actual time=0.234..0.234 rows=1 loops=1)

  • Group Key: poc.id
6. 0.004 0.230 ↑ 1.0 1 1

Nested Loop Semi Join (cost=4.46..101.60 rows=1 width=8) (actual time=0.198..0.230 rows=1 loops=1)

7. 0.063 0.145 ↓ 3.0 3 1

Bitmap Heap Scan on poc (cost=4.18..19.94 rows=1 width=18) (actual time=0.106..0.145 rows=3 loops=1)

  • Recheck Cond: (coverage_area ~ '0101000000382F4E7CB55147C0DD7C23BA679137C0'::geometry)
  • Filter: ((is_open IS TRUE) AND (status = ANY ('{OPERATIONAL,ASSISTED_OPERATIONAL}'::poc_status[])) AND _st_contains(coverage_area, '0101000000382F4E7CB55147C0DD7C23BA679137C0'::geometry))
  • Rows Removed by Filter: 11
  • Heap Blocks: exact=14
8. 0.082 0.082 ↓ 9.0 36 1

Bitmap Index Scan on idx_poc_coverage_area (cost=0.00..4.18 rows=4 width=0) (actual time=0.082..0.082 rows=36 loops=1)

  • Index Cond: (coverage_area ~ '0101000000382F4E7CB55147C0DD7C23BA679137C0'::geometry)
9. 0.054 0.081 ↓ 0.0 0 3

Index Scan using ix_poc_id_work_day on poc_work_day (cost=0.28..81.64 rows=1 width=12) (actual time=0.027..0.027 rows=0 loops=3)

  • Index Cond: (poc_id = poc.id)
  • Filter: ((active IS TRUE) AND (date_part('dow'::text, timezone((poc.poc_timezone)::text, now())) = (week_day)::double precision) AND (SubPlan 1))
  • Rows Removed by Filter: 5
10.          

SubPlan (for Index Scan)

11. 0.027 0.027 ↓ 0.0 0 3

Index Scan using poc_working_interval_work_day_id_idx on poc_working_interval (cost=0.28..8.32 rows=1 width=0) (actual time=0.008..0.009 rows=0 loops=3)

  • Index Cond: (poc_work_day.id = work_day_id)
  • Filter: (((timezone((poc.poc_timezone)::text, now()))::time without time zone >= opening_time) AND ((timezone((poc.poc_timezone)::text, now()))::time without time zone <= closing_time))
  • Rows Removed by Filter: 1
12. 0.016 0.016 ↓ 0.0 0 1

Index Scan using poc_product_variant on inventory_item (cost=0.42..8.44 rows=1 width=4) (actual time=0.016..0.016 rows=0 loops=1)

  • Index Cond: ((poc_id = poc_work_day.poc_id) AND (product_variant_id = 5432))
  • Filter: ((available_date IS NOT NULL) AND (price > '0'::double precision))
13. 0.000 0.000 ↓ 0.0 0

Nested Loop Semi Join (cost=0.70..1.10 rows=1 width=8) (never executed)

  • Join Filter: (poc_1.id = poc_delivery_type.poc_id)
14. 0.000 0.000 ↓ 0.0 0

Index Only Scan using poc_pkey on poc poc_1 (cost=0.28..0.39 rows=1 width=4) (never executed)

  • Index Cond: (id = poc_work_day.poc_id)
  • Heap Fetches: 0
15. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.42..0.70 rows=1 width=4) (never executed)

16. 0.000 0.000 ↓ 0.0 0

Index Scan using poc_delivery_type_poc_id_index on poc_delivery_type (cost=0.29..0.51 rows=1 width=8) (never executed)

  • Index Cond: (poc_id = poc_work_day.poc_id)
  • Filter: active
17. 0.000 0.000 ↓ 0.0 0

Index Scan using delivery_type_pkey on delivery_type (cost=0.13..0.16 rows=1 width=4) (never executed)

  • Index Cond: (id = poc_delivery_type.delivery_type_id)
  • Filter: (type = 'RECEIVE'::deliverytypeenum)
Planning time : 6.431 ms
Execution time : 0.399 ms