explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2HPq

Settings
# exclusive inclusive rows x rows loops node
1. 0.836 0.836 ↓ 2.0 2 1

CTE Scan on tbl (cost=17.64..40.14 rows=1 width=246) (actual time=0.763..0.836 rows=2 loops=1)

  • Filter: ((dayp ->> 'day'::text) ~~* 'TUESDAY'::text)
  • Rows Removed by Filter: 2
2.          

CTE tbl

3. 0.063 0.790 ↑ 225.0 4 1

Hash Join (cost=3.11..17.64 rows=900 width=45) (actual time=0.747..0.790 rows=4 loops=1)

  • Hash Cond: ((unnest(r.idpromos)) = p.id)
4.          

Initplan (for Hash Join)

5. 0.051 0.051 ↑ 1.0 1 1

Result (cost=0.00..0.02 rows=1 width=0) (actual time=0.050..0.051 rows=1 loops=1)

6. 0.068 0.068 ↑ 50.0 2 1

Index Scan using recetas_pkey on recetas r (cost=0.28..8.79 rows=100 width=25) (actual time=0.062..0.068 rows=2 loops=1)

  • Index Cond: (id = 764)
7. 0.023 0.608 ↓ 1.2 11 1

Hash (cost=2.70..2.70 rows=9 width=45) (actual time=0.608..0.608 rows=11 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 7kB
8. 0.585 0.585 ↓ 1.2 11 1

Seq Scan on promociones p (cost=0.00..2.70 rows=9 width=45) (actual time=0.123..0.585 rows=11 loops=1)

  • Filter: ((activo ~~* 'A'::text) AND (("position"((datos ->> 'promotionDays'::text), $0) > 0) OR (((datos ->> 'promotionDays'::text))::text ~~* 'ALLDAYS'::text)))
  • Rows Removed by Filter: 4
Planning time : 0.737 ms
Execution time : 1.033 ms