explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EtNO

Settings
# exclusive inclusive rows x rows loops node
1. 5.387 152.819 ↑ 1.8 10 1

GroupAggregate (cost=4,245.39..4,247.01 rows=18 width=620) (actual time=141.255..152.819 rows=10 loops=1)

  • Group Key: tipovenda3_.nome
2. 12.186 147.432 ↓ 3.6 309 1

Sort (cost=4,245.39..4,245.61 rows=87 width=536) (actual time=140.835..147.432 rows=309 loops=1)

  • Sort Key: tipovenda3_.nome
  • Sort Method: quicksort Memory: 49kB
3. 19.632 135.246 ↓ 3.6 309 1

Hash Join (cost=249.73..4,242.59 rows=87 width=536) (actual time=7.528..135.246 rows=309 loops=1)

  • Hash Cond: (recebiment0_.tipo_venda_id = tipovenda3_.id)
4. 10.495 115.160 ↓ 3.6 309 1

Nested Loop (cost=248.33..4,240.90 rows=87 width=28) (actual time=7.020..115.160 rows=309 loops=1)

5. 0.060 0.060 ↑ 1.0 1 1

Seq Scan on loja loja2_ (cost=0.00..1.10 rows=1 width=8) (actual time=0.032..0.060 rows=1 loops=1)

  • Filter: ((id = 5) AND (empresa_id = 1))
  • Rows Removed by Filter: 6
6. 50.615 104.605 ↓ 3.6 309 1

Nested Loop (cost=248.33..4,238.92 rows=87 width=36) (actual time=6.951..104.605 rows=309 loops=1)

7. 17.486 18.565 ↓ 3.7 325 1

Bitmap Heap Scan on venda venda1_ (cost=247.91..3,527.99 rows=87 width=16) (actual time=6.763..18.565 rows=325 loops=1)

  • Recheck Cond: (loja_id = 5)
  • Filter: ((NOT venda_avulsa) AND (data_venda >= '2019-01-01 00:00:00'::timestamp without time zone) AND (data_venda <= '2019-01-31 00:00:00'::timestamp without time zone))
  • Rows Removed by Filter: 13356
  • Heap Blocks: exact=977
8. 1.079 1.079 ↓ 1.0 13,681 1

Bitmap Index Scan on venda_loja_id_ix (cost=0.00..247.88 rows=13,262 width=0) (actual time=1.068..1.079 rows=13,681 loops=1)

  • Index Cond: (loja_id = 5)
9. 35.425 35.425 ↑ 1.0 1 325

Index Scan using recebimento_venda_venda_pk_ix on recebimento_venda recebiment0_ (cost=0.42..8.16 rows=1 width=36) (actual time=0.064..0.109 rows=1 loops=325)

  • Index Cond: (venda_id = venda1_.id)
10. 0.223 0.454 ↑ 1.0 18 1

Hash (cost=1.18..1.18 rows=18 width=524) (actual time=0.442..0.454 rows=18 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
11. 0.231 0.231 ↑ 1.0 18 1

Seq Scan on tipo_venda tipovenda3_ (cost=0.00..1.18 rows=18 width=524) (actual time=0.028..0.231 rows=18 loops=1)

Planning time : 6.147 ms
Execution time : 155.468 ms