explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CHgO

Settings
# exclusive inclusive rows x rows loops node
1. 0.075 14.548 ↓ 3.8 30 1

Sort (cost=1,262.67..1,262.69 rows=8 width=208) (actual time=14.545..14.548 rows=30 loops=1)

  • Sort Key: ei.ei_codigo
  • Sort Method: quicksort Memory: 32kB
  • Buffers: shared hit=6217
2. 0.028 14.473 ↓ 3.8 30 1

Nested Loop (cost=240.79..1,262.55 rows=8 width=208) (actual time=2.322..14.473 rows=30 loops=1)

  • Buffers: shared hit=6217
3. 0.033 14.355 ↓ 3.8 30 1

Hash Join (cost=240.51..1,259.8 rows=8 width=181) (actual time=2.312..14.355 rows=30 loops=1)

  • Buffers: shared hit=6127
4. 0.000 14.284 ↓ 3.8 30 1

Nested Loop (cost=239.2..1,258.45 rows=8 width=103) (actual time=2.264..14.284 rows=30 loops=1)

  • Buffers: shared hit=6126
5. 0.336 12.522 ↓ 6.7 905 1

Nested Loop (cost=238.92..1,216.6 rows=135 width=107) (actual time=2.171..12.522 rows=905 loops=1)

  • Buffers: shared hit=3410
6. 5.056 10.376 ↓ 6.7 905 1

Hash Join (cost=238.63..1,171.93 rows=135 width=99) (actual time=2.152..10.376 rows=905 loops=1)

  • Buffers: shared hit=689
7. 3.423 3.423 ↑ 1.0 26,872 1

Seq Scan on entrega_itens ei (cost=0..862.72 rows=26,872 width=24) (actual time=0.238..3.423 rows=26,872 loops=1)

  • Buffers: shared hit=594
8. 0.052 1.897 ↓ 4.2 150 1

Hash (cost=238.18..238.18 rows=36 width=75) (actual time=1.897..1.897 rows=150 loops=1)

  • Buffers: shared hit=95
9. 1.845 1.845 ↓ 4.2 150 1

Seq Scan on entrega e (cost=0..238.18 rows=36 width=75) (actual time=0.017..1.845 rows=150 loops=1)

  • Filter: (((e.ent_datahora)::date >= '2019-07-01'::date) AND ((e.ent_datahora)::date <= '2019-08-31'::date))
  • Buffers: shared hit=95
10. 1.810 1.810 ↑ 1.0 1 905

Index Scan using pk_venda_itens on venda_itens vi (cost=0.29..0.33 rows=1 width=12) (actual time=0.002..0.002 rows=1 loops=905)

  • Index Cond: (vi.vi_codigo = ei.vi_codigo)
  • Buffers: shared hit=2721
11. 1.810 1.810 ↓ 0.0 0 905

Index Scan using pk_venda on venda v (cost=0.28..0.31 rows=1 width=12) (actual time=0.002..0.002 rows=0 loops=905)

  • Index Cond: ((v.ven_codigo = vi.ven_codigo) AND (v.emp_codigo = vi.emp_codigo))
  • Filter: (v.vds_codigo = 54)
  • Buffers: shared hit=2716
12. 0.011 0.038 ↑ 1.0 14 1

Hash (cost=1.14..1.14 rows=14 width=82) (actual time=0.038..0.038 rows=14 loops=1)

  • Buffers: shared hit=1
13. 0.027 0.027 ↑ 1.0 14 1

Seq Scan on usuario u (cost=0..1.14 rows=14 width=82) (actual time=0.025..0.027 rows=14 loops=1)

  • Buffers: shared hit=1
14. 0.090 0.090 ↑ 1.0 1 30

Index Scan using pk_cliente on cliente c (cost=0.27..0.34 rows=1 width=35) (actual time=0.003..0.003 rows=1 loops=30)

  • Index Cond: (c.cli_codigo = v.cli_codigo)
  • Buffers: shared hit=90