explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ZFac : SELECT DP.COD_FAMILIA, DP.FAMILIA, DP.PRODUTO, SUM(F.QUANTIDADE_VENDA) AS QUANTIDADE_VENDAS FROM FATO_PREVISAO_VENDA_PEDIDO_SAFRA_MES F INNER JOIN DIM_TEMPO_MES DTD ON DTD.SK_TEMPO_MES = F.SK_TEMPO_MES AND DTD.ANO in (2017,2018) INNER JOIN DIM_PRODUTO DP ON DP.SK_PRODUTO = F.SK_PRODUTO GROUP BY 1,2,3

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.158 55.012 ↑ 11.4 71 1

Sort (cost=146.630..148.650 rows=808 width=138) (actual time=55.009..55.012 rows=71 loops=1)

  • Sort Key: two.xray, kilo.tango, (six(kilo.echo))
  • Sort Method: quicksort Memory: 43kB
2. 1.378 54.854 ↑ 11.4 71 1

Hash Join (cost=1.140..107.610 rows=808 width=138) (actual time=42.495..54.854 rows=71 loops=1)

  • Hash Cond: (kilo.india = two.echo)
3. 53.465 53.465 ↓ 3.0 2,402 1

Seq Scan on hotel kilo (cost=0.000..89.300 rows=808 width=78) (actual time=0.052..53.465 rows=2,402 loops=1)

  • Filter: bravo(echo)
4. 0.004 0.011 ↑ 1.0 4 1

Hash (cost=1.090..1.090 rows=4 width=68) (actual time=0.011..0.011 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
5. 0.007 0.007 ↑ 1.0 4 1

Seq Scan on lima two (cost=0.000..1.090 rows=4 width=68) (actual time=0.005..0.007 rows=4 loops=1)

  • Filter: ((xray <> 'sierra'::name) AND (xray <> 'november'::name))