explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CXnm : Optimization for: plan #pkK9

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.045 24.827 ↑ 1.0 4 1

Sort (cost=1,553.74..1,553.75 rows=4 width=25) (actual time=24.826..24.827 rows=4 loops=1)

  • Sort Key: pui.cod_prod_use
  • Sort Method: quicksort Memory: 25kB
2. 2.352 24.782 ↑ 1.0 4 1

HashAggregate (cost=1,553.66..1,553.70 rows=4 width=25) (actual time=24.781..24.782 rows=4 loops=1)

  • Group Key: pui.cod_prod_use, pui.name
3. 1.911 22.430 ↑ 1.1 4,017 1

Hash Join (cost=798.35..1,519.47 rows=4,558 width=17) (actual time=11.298..22.430 rows=4,017 loops=1)

  • Hash Cond: (p.cod_prod_use = pui.cod_prod_use)
4. 5.182 20.494 ↑ 1.1 4,017 1

Hash Join (cost=797.15..1,438.51 rows=4,558 width=4) (actual time=11.263..20.494 rows=4,017 loops=1)

  • Hash Cond: (prod.cod_producto = p.cod_producto)
5. 4.236 4.236 ↑ 1.0 15,255 1

Seq Scan on productos prod (cost=0.00..538.46 rows=15,286 width=4) (actual time=0.008..4.236 rows=15,255 loops=1)

6. 1.518 11.076 ↑ 1.1 4,017 1

Hash (cost=740.17..740.17 rows=4,558 width=8) (actual time=11.076..11.076 rows=4,017 loops=1)

  • Buckets: 8192 Batches: 1 Memory Usage: 221kB
7. 9.558 9.558 ↑ 1.1 4,017 1

Seq Scan on v_productos_es p (cost=0.00..740.17 rows=4,558 width=8) (actual time=0.010..9.558 rows=4,017 loops=1)

  • Filter: ((cod_prod_role = ANY ('{1,2}'::integer[])) AND ((visible_web)::text = 'S'::text))
  • Rows Removed by Filter: 4421
8. 0.004 0.025 ↑ 1.0 4 1

Hash (cost=1.15..1.15 rows=4 width=17) (actual time=0.025..0.025 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
9. 0.021 0.021 ↑ 1.0 4 1

Seq Scan on prods_uses_idioma pui (cost=0.00..1.15 rows=4 width=17) (actual time=0.014..0.021 rows=4 loops=1)

  • Filter: ((cod_idioma)::text = 'es'::text)
  • Rows Removed by Filter: 24