explain.depesz.com

PostgreSQL's explain analyze made readable

Result: H5AZ

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

Subquery Scan on tbl (cost=3.11..31.14 rows=1 width=77) (actual time=0.708..0.771 rows=2 loops=1)

  • Filter: ((tbl.dayp ->> 'day'::text) ~~* 'TUESDAY'::text)
  • Rows Removed by Filter: 2
2. 0.099 0.735 ↑ 225.0 4 1

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

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

Initplan (for Hash Join)

4. 0.028 0.028 ↑ 1.0 1 1

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

5. 0.041 0.041 ↑ 50.0 2 1

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

  • Index Cond: (id = 764)
6. 0.031 0.567 ↓ 1.2 11 1

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

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

Seq Scan on promociones p (cost=0.00..2.70 rows=9 width=45) (actual time=0.083..0.536 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.604 ms
Execution time : 0.898 ms