explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Uu4A : rel 561

Settings
# exclusive inclusive rows x rows loops node
1. 853.221 7,176.097 ↓ 0.0 293,040 1

Custom Scan (Citus Adaptive) (cost=0.00..0.00 rows=0 width=0) (actual time=7,136.265..7,176.097 rows=293,040 loops=1)

  • Task Count: 1
  • Tasks Shown: All
  • -> Task
  • Node: host=citus-node-001 port=5,434 dbname=bi_vendas
2. 717.864 6,322.876 ↑ 1.1 293,040 1

Hash Left Join (cost=485,653.62..563,159.24 rows=317,846 width=1,047) (actual time=5,192.343..6,322.876 rows=293,040 loops=1)

  • Hash Cond: (vcl09_mix.vcl09_id_comprador = comprador.vcl08_id)
  • JIT:
  • Functions: 51
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 8.949 ms, Inlining 9.366 ms, Optimization 484.106 ms, Emission 338.578 ms, Total 841.000 ms
3. 273.877 5,604.680 ↑ 1.1 293,040 1

Hash Right Join (cost=484,817.41..541,613.12 rows=317,846 width=610) (actual time=5,191.974..5,604.680 rows=293,040 loops=1)

  • Hash Cond: ((vcl09_mix.vcl09_id_filial = filial.vcl02_id) AND (vcl09_mix.vcl09_id_produto = produto.vcl04_id))
4. 139.416 139.416 ↑ 1.0 416,806 1

Index Scan using vcl09_mix_pkey_115533 on vcl09_mix_115533 vcl09_mix (cost=0.43..50,469.37 rows=419,774 width=32) (actual time=0.023..139.416 rows=416,806 loops=1)

  • Index Cond: (vcl09_id_filial = 7)
5. 231.654 5,191.387 ↑ 1.1 293,040 1

Hash (cost=480,068.04..480,068.04 rows=316,596 width=594) (actual time=5,191.387..5,191.387 rows=293,040 loops=1)

  • Buckets: 524,288 Batches: 1 Memory Usage: 138,181kB
6. 128.119 4,959.733 ↑ 1.1 293,040 1

Hash Join (cost=463,404.95..480,068.04 rows=316,596 width=594) (actual time=4,431.216..4,959.733 rows=293,040 loops=1)

  • Hash Cond: (vcl01_pedido_item.vcl01_id_produto = produto.vcl04_id)
7. 21.559 3,673.638 ↑ 1.1 293,040 1

Nested Loop (cost=424,612.18..440,444.20 rows=316,596 width=385) (actual time=3,272.637..3,673.638 rows=293,040 loops=1)

8. 0.018 0.018 ↑ 1.0 1 1

Index Scan using vcl02_filial_pkey_113567 on vcl02_filial_113567 filial (cost=0.15..2.37 rows=1 width=117) (actual time=0.014..0.018 rows=1 loops=1)

  • Index Cond: (vcl02_id = 7)
9. 2,179.662 3,652.061 ↑ 1.1 293,040 1

HashAggregate (cost=424,612.04..434,109.92 rows=316,596 width=532) (actual time=3,272.615..3,652.061 rows=293,040 loops=1)

  • Group Key: vcl01_pedido_item.vcl01_data, vcl01_pedido_item.vcl01_id_filial, vcl01_pedido_item.vcl01_id_produto
10. 390.846 1,472.399 ↓ 1.0 3,166,247 1

Hash Join (cost=132.11..274,228.98 rows=3,165,959 width=58) (actual time=0.185..1,472.399 rows=3,166,247 loops=1)

  • Hash Cond: (vcl01_pedido_item.vcl01_id_movimento_estoque = mov.vcl03_id)
11. 1,081.400 1,081.400 ↓ 1.0 3,166,247 1

Seq Scan on vcl01_pedido_item_202002_115181 vcl01_pedido_item (cost=0.00..265,631.07 rows=3,165,959 width=58) (actual time=0.022..1,081.400 rows=3,166,247 loops=1)

  • Filter: ((vcl01_data >= '2020-02-01'::date) AND (vcl01_data <= '2020-02-29'::date) AND (vcl01_id_filial = 7))
  • Rows Removed by Filter: 3,684,486
12. 0.031 0.153 ↑ 1.0 227 1

Hash (cost=129.27..129.27 rows=227 width=16) (actual time=0.153..0.153 rows=227 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 19kB
13. 0.122 0.122 ↑ 1.0 227 1

Seq Scan on vcl03_movimento_estoque_113568 mov (cost=0.00..129.27 rows=227 width=16) (actual time=0.005..0.122 rows=227 loops=1)

14. 197.769 1,157.976 ↑ 1.0 418,123 1

Hash (cost=33,566.23..33,566.23 rows=418,123 width=217) (actual time=1,157.976..1,157.976 rows=418,123 loops=1)

  • Buckets: 524,288 Batches: 1 Memory Usage: 121,265kB
15. 960.207 960.207 ↑ 1.0 418,123 1

Seq Scan on vcl04_produto_113569 produto (cost=0.00..33,566.23 rows=418,123 width=217) (actual time=832.548..960.207 rows=418,123 loops=1)

16. 0.074 0.332 ↑ 1.0 347 1

Hash (cost=831.87..831.87 rows=347 width=53) (actual time=0.332..0.332 rows=347 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 39kB
17. 0.258 0.258 ↑ 1.0 347 1

Index Scan using vcl08_comprador_pkey_113572 on vcl08_comprador_113572 comprador (cost=0.27..831.87 rows=347 width=53) (actual time=0.011..0.258 rows=347 loops=1)

Planning time : 3.117 ms
Execution time : 7,203.667 ms