explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tyxD : Optimization for: plan #AW4w

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Sort (cost=12.62..12.63 rows=2 width=246) (actual rows= loops=)

  • Sort Key: b.id_ite, a.id_ctb, a.dat_fxo, a.id_ope, a.id_fxo
2. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.27..12.61 rows=2 width=246) (actual rows= loops=)

  • Join Filter: (a.cod_pnt_etq = pe.cod_pnt_etq)
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..3.24 rows=2 width=167) (actual rows= loops=)

  • Join Filter: (b.cod_res_inv_det = a.cod_res_inv_det)
4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..2.08 rows=1 width=72) (actual rows= loops=)

  • Join Filter: (b.cod_res_inv = c.cod_res_inv)
5. 0.000 0.000 ↓ 0.0

Seq Scan on resultado_inventario c (cost=0.00..1.03 rows=1 width=4) (actual rows= loops=)

  • Filter: ((flg_decreto_3517r IS NOT NULL) AND ((flg_decreto_3517r)::text = 'S'::text) AND (dat_ref = '2020-09-01 00:00:00'::timestamp without time zone) AND (cod_fil = 1))
6. 0.000 0.000 ↓ 0.0

Seq Scan on resultado_inventario_detalhe b (cost=0.00..1.02 rows=2 width=76) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Seq Scan on resultado_inventario_fluxo a (cost=0.00..1.07 rows=7 width=99) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Materialize (cost=0.27..9.32 rows=1 width=79) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=0.27..9.31 rows=1 width=79) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Seq Scan on ponto_estoque pe (cost=0.00..1.01 rows=1 width=51) (actual rows= loops=)

11. 0.000 0.000 ↓ 0.0

Index Scan using clientes_pkey on clientes cl (cost=0.27..8.29 rows=1 width=36) (actual rows= loops=)

  • Index Cond: (pe.cod_cli = codigo_cli)