explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GuRD

Settings
# exclusive inclusive rows x rows loops node
1. 36.528 2,061.448 ↓ 2,890.2 11,561 1

GroupAggregate (cost=1,143.33..1,143.47 rows=4 width=40) (actual time=2,012.799..2,061.448 rows=11,561 loops=1)

  • Group Key: pa.cod_producto, pz.plazo_proveedor
2. 56.451 2,024.920 ↓ 3,948.0 15,792 1

Sort (cost=1,143.33..1,143.34 rows=4 width=16) (actual time=2,012.775..2,024.920 rows=15,792 loops=1)

  • Sort Key: pa.cod_producto, pz.plazo_proveedor
  • Sort Method: quicksort Memory: 873kB
3. 81.942 1,968.469 ↓ 3,948.0 15,792 1

Nested Loop (cost=15.85..1,143.29 rows=4 width=16) (actual time=2.443..1,968.469 rows=15,792 loops=1)

4. 83.214 1,700.705 ↓ 4,424.3 13,273 1

Nested Loop (cost=15.43..1,141.08 rows=3 width=16) (actual time=2.196..1,700.705 rows=13,273 loops=1)

5. 27.138 47.369 ↓ 26.0 13,773 1

Nested Loop (cost=15.01..441.17 rows=530 width=16) (actual time=1.799..47.369 rows=13,773 loops=1)

6. 0.018 0.018 ↑ 1.0 1 1

Seq Scan on almacenes a (cost=0.00..1.32 rows=1 width=4) (actual time=0.013..0.018 rows=1 loops=1)

  • Filter: ((no_contabiliza)::text = 'N'::text)
  • Rows Removed by Filter: 25
7. 18.517 20.213 ↓ 21.0 13,773 1

Bitmap Heap Scan on productos_almacen pa (cost=15.01..433.28 rows=656 width=16) (actual time=1.780..20.213 rows=13,773 loops=1)

  • Recheck Cond: ((cod_almacen = a.cod_almacen) AND (cod_almacen = ANY ('{1}'::integer[])))
  • Heap Blocks: exact=381
8. 1.696 1.696 ↓ 21.0 13,775 1

Bitmap Index Scan on pa_ca_idx (cost=0.00..14.85 rows=656 width=0) (actual time=1.696..1.696 rows=13,775 loops=1)

  • Index Cond: ((cod_almacen = a.cod_almacen) AND (cod_almacen = ANY ('{1}'::integer[])))
9. 1,570.122 1,570.122 ↑ 1.0 1 13,773

Index Scan using productos_grupo_tarifas_pk on productos_grupo_tarifas pgt (cost=0.42..1.31 rows=1 width=8) (actual time=0.112..0.114 rows=1 loops=13,773)

  • Index Cond: ((cod_producto = pa.cod_producto) AND (cod_grupo_tarifas = ANY ('{1}'::integer[])))
  • Filter: (pa.cod_almacen = f_get_almacen(pa.cod_producto, '{1}'::integer[], cod_proveedor, 1))
10. 185.822 185.822 ↑ 2.0 1 13,273

Index Scan using prod_plzwp_pk on prod_plazo_wh_pais pz (cost=0.42..0.72 rows=2 width=8) (actual time=0.011..0.014 rows=1 loops=13,273)

  • Index Cond: ((cod_producto = pa.cod_producto) AND ((cod_pais_envio)::text = 'ES'::text))