explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lzC4 : Optimization for: plan #vaIK

Settings

Optimization path:

Optimization(s) for this plan:

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

Aggregate (cost=39,902.26..39,902.27 rows=1 width=8) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,002.34..39,902.26 rows=1 width=8) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,002.34..39,901.21 rows=1 width=12) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Nested Loop (cost=1,002.05..39,892.89 rows=1 width=16) (actual rows= loops=)

5. 0.000 0.000 ↓ 0.0

Gather (cost=1,001.63..39,884.43 rows=1 width=20) (actual rows= loops=)

  • Workers Planned: 2
6. 0.000 0.000 ↓ 0.0

Hash Join (cost=1.63..38,884.33 rows=1 width=20) (actual rows= loops=)

  • Hash Cond: (f.identificador_chave = i.ide_id)
7. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on fatos_comercial f (cost=0.00..38,882.68 rows=6 width=24) (actual rows= loops=)

  • Filter: ((produto_chave = 202) AND (filial_chave = 1) AND (operador = 2))
8. 0.000 0.000 ↓ 0.0

Hash (cost=1.60..1.60 rows=2 width=4) (actual rows= loops=)

9. 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)
10. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (doc_id = f.documento_chave)
  • Filter: ((dt_emissao >= '2019-04-01 00:00:00'::timestamp without time zone) AND (dt_emissao <= '2019-04-30 00:00:00'::timestamp without time zone) AND ((identificador)::text = 'DOC_NOTA_VENDA'::text) AND (situacao = 6))
11. 0.000 0.000 ↓ 0.0

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

  • Index Cond: (produto_id = 202)
12. 0.000 0.000 ↓ 0.0

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