explain.depesz.com

PostgreSQL's explain analyze made readable

Result: nu7F

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

Nested Loop (cost=0.14..13.01 rows=1 width=4) (actual time=0.117..0.119 rows=1 loops=1)

2. 0.015 0.101 ↑ 1.0 1 1

Seq Scan on campaign_conditions cc (cost=0.00..4.84 rows=1 width=4) (actual time=0.100..0.101 rows=1 loops=1)

  • Filter: ((condition_type_id = 8) AND ((SubPlan 1) = 'f4666006-4be6-437e-8dc8-59ed9e2746e6'::text))
  • Rows Removed by Filter: 7
3.          

SubPlan (forSeq Scan)

4. 0.086 0.086 ↓ 0.0 0 2

Function Scan on json_array_elements_text (cost=0.02..1.26 rows=1 width=32) (actual time=0.043..0.043 rows=0 loops=2)

  • Filter: (value = 'f4666006-4be6-437e-8dc8-59ed9e2746e6'::text)
  • Rows Removed by Filter: 0
5. 0.016 0.016 ↑ 1.0 1 1

Index Scan using campaigns_pkey on campaigns c (cost=0.14..8.16 rows=1 width=4) (actual time=0.015..0.016 rows=1 loops=1)

  • Index Cond: (id = cc.campaign_id)
  • Filter: (active AND (now() >= starts_at) AND (now() <= ends_at))