explain.depesz.com

PostgreSQL's explain analyze made readable

Result: umQQ

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

Seq Scan on estoque_saldo es (cost=0.00..109,973,642.24 rows=2,368 width=42) (actual rows= loops=)

  • Filter: ((ano_base = 2019) AND (mes_base = 5))
2.          

SubPlan (forSeq Scan)

3. 0.000 0.000 ↓ 0.0

Aggregate (cost=46,441.53..46,441.54 rows=1 width=8) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..46,441.53 rows=1 width=8) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.71..46,440.48 rows=1 width=12) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.42..46,432.16 rows=1 width=16) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=0.00..46,423.67 rows=1 width=20) (actual rows= loops=)

  • Join Filter: (f.identificador_chave = i.ide_id)
8. 0.000 0.000 ↓ 0.0

Seq Scan on fatos_comercial f (cost=0.00..46,421.86 rows=7 width=24) (actual rows= loops=)

  • Filter: ((filial_chave = es.filial_id) AND (operador = 2) AND (produto_chave = (es.produto_id)::integer))
9. 0.000 0.000 ↓ 0.0

Materialize (cost=0.00..1.61 rows=2 width=4) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Seq Scan on identificador i (cost=0.00..1.60 rows=2 width=4) (actual rows= loops=)

  • Filter: ((ide_descricao)::text = 'Vendas'::text)
11. 0.000 0.000 ↓ 0.0

Index Scan using st2_documento_01 on documento d (cost=0.42..8.48 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (doc_id = f.documento_chave)
  • Filter: ((dt_emissao <= es.data_posicao) AND ((identificador)::text = 'DOC_NOTA_VENDA'::text) AND (situacao = 6) AND (dt_emissao >= (((('01/'::text || (date_part('month'::text, es.data_posicao))::text) || '/'::text) || (date_part('year'::text, es.data_posicao))::text))::date))
12. 0.000 0.000 ↓ 0.0

Index Only Scan using st2_produto_01 on produto p (cost=0.29..8.31 rows=1 width=4) (actual rows= loops=)

  • Index Cond: (produto_id = (es.produto_id)::integer)
13. 0.000 0.000 ↓ 0.0

Seq Scan on filial l (cost=0.00..1.04 rows=1 width=4) (actual rows= loops=)