explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2N0x

Settings
# exclusive inclusive rows x rows loops node
1. 236,219.354 236,492.069 ↑ 1.1 12,187 1

WindowAgg (cost=6,136.64..144,912.76 rows=13,089 width=797) (actual time=127.076..236,492.069 rows=12,187 loops=1)

2. 16.390 102.097 ↑ 1.1 12,187 1

Sort (cost=6,136.64..6,169.36 rows=13,089 width=269) (actual time=91.597..102.097 rows=12,187 loops=1)

  • Sort Key: lic.pkinlicitacao
  • Sort Method: quicksort Memory: 2643kB
3. 2.835 85.707 ↑ 1.1 12,187 1

Hash Join (cost=4,111.69..5,241.60 rows=13,089 width=269) (actual time=57.877..85.707 rows=12,187 loops=1)

  • Hash Cond: (lic.fkinstatuslicitacao = st.pkinstatuslicitacao)
4. 2.962 82.837 ↑ 1.1 12,187 1

Hash Join (cost=4,110.51..5,187.87 rows=13,089 width=269) (actual time=57.833..82.837 rows=12,187 loops=1)

  • Hash Cond: (lic.fkinmodalidade = mod.pkinmodalidade)
5. 2.799 79.858 ↑ 1.1 12,187 1

Hash Join (cost=4,109.29..5,137.72 rows=13,089 width=95) (actual time=57.810..79.858 rows=12,187 loops=1)

  • Hash Cond: (ug.cod_unid_administrativa = uadm.cod_unid_administrativa)
6. 3.176 77.041 ↑ 1.1 12,187 1

Hash Join (cost=4,107.93..5,092.90 rows=13,089 width=99) (actual time=57.785..77.041 rows=12,187 loops=1)

  • Hash Cond: (ugi.fkunidade_gestora = ug.cod_ug)
7. 10.703 73.800 ↑ 1.1 12,187 1

Hash Join (cost=4,102.43..5,051.73 rows=13,089 width=47) (actual time=57.713..73.800 rows=12,187 loops=1)

  • Hash Cond: (ugi.fkinlicitacao = lic.pkinlicitacao)
8. 5.428 5.428 ↑ 1.0 42,720 1

Seq Scan on tbugsinteressada ugi (cost=0.00..658.20 rows=42,720 width=8) (actual time=0.007..5.428 rows=42,720 loops=1)

9. 3.045 57.669 ↑ 1.0 11,182 1

Hash (cost=3,959.97..3,959.97 rows=11,397 width=43) (actual time=57.668..57.669 rows=11,182 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 991kB
10. 2.905 54.624 ↑ 1.0 11,182 1

Hash Join (cost=3,201.84..3,959.97 rows=11,397 width=43) (actual time=37.050..54.624 rows=11,182 loops=1)

  • Hash Cond: (lic.fkintbunidadegestora_cpl = cpl.cod_ug)
11. 9.795 51.690 ↑ 1.0 11,182 1

Hash Right Join (cost=3,196.35..3,923.41 rows=11,397 width=47) (actual time=37.015..51.690 rows=11,182 loops=1)

  • Hash Cond: (catob.fkinlicitacao = lic.pkinlicitacao)
12. 4.932 4.932 ↑ 1.0 40,321 1

Seq Scan on tbcategoriadeobjdalic catob (cost=0.00..621.21 rows=40,321 width=8) (actual time=0.011..4.932 rows=40,321 loops=1)

13. 3.521 36.963 ↑ 1.0 10,483 1

Hash (cost=3,064.92..3,064.92 rows=10,514 width=43) (actual time=36.963..36.963 rows=10,483 loops=1)

  • Buckets: 16384 Batches: 1 Memory Usage: 936kB
14. 33.442 33.442 ↑ 1.0 10,483 1

Seq Scan on tblicitacao lic (cost=0.00..3,064.92 rows=10,514 width=43) (actual time=0.016..33.442 rows=10,483 loops=1)

  • Filter: ((nmvalorlicitacao > '1'::numeric) AND (insituacaoenvio = 9) AND (pkinlicitacao <> ALL ('{1986,10764,20777,22402}'::integer[])))
  • Rows Removed by Filter: 26713
15. 0.014 0.029 ↑ 1.0 111 1

Hash (cost=4.11..4.11 rows=111 width=4) (actual time=0.029..0.029 rows=111 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
16. 0.015 0.015 ↑ 1.0 111 1

Seq Scan on unidade_gestora cpl (cost=0.00..4.11 rows=111 width=4) (actual time=0.002..0.015 rows=111 loops=1)

17. 0.024 0.065 ↑ 1.0 111 1

Hash (cost=4.11..4.11 rows=111 width=56) (actual time=0.065..0.065 rows=111 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
18. 0.041 0.041 ↑ 1.0 111 1

Seq Scan on unidade_gestora ug (cost=0.00..4.11 rows=111 width=56) (actual time=0.005..0.041 rows=111 loops=1)

19. 0.003 0.018 ↑ 1.0 16 1

Hash (cost=1.16..1.16 rows=16 width=4) (actual time=0.018..0.018 rows=16 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
20. 0.015 0.015 ↑ 1.0 16 1

Seq Scan on unidade_administrativa uadm (cost=0.00..1.16 rows=16 width=4) (actual time=0.012..0.015 rows=16 loops=1)

21. 0.003 0.017 ↑ 1.0 10 1

Hash (cost=1.10..1.10 rows=10 width=182) (actual time=0.016..0.017 rows=10 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
22. 0.014 0.014 ↑ 1.0 10 1

Seq Scan on tbmodalidade mod (cost=0.00..1.10 rows=10 width=182) (actual time=0.012..0.014 rows=10 loops=1)

23. 0.009 0.035 ↑ 1.0 8 1

Hash (cost=1.08..1.08 rows=8 width=4) (actual time=0.035..0.035 rows=8 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
24. 0.026 0.026 ↑ 1.0 8 1

Seq Scan on tbstatuslicitacao st (cost=0.00..1.08 rows=8 width=4) (actual time=0.024..0.026 rows=8 loops=1)

25.          

SubPlan (forWindowAgg)

26. 24.374 24.374 ↑ 1.0 1 12,187

Seq Scan on tbtipolicitacao (cost=0.00..1.05 rows=1 width=178) (actual time=0.002..0.002 rows=1 loops=12,187)

  • Filter: (pkintipolicitacao = lic.fkintipolicitacao)
  • Rows Removed by Filter: 3
27. 109.683 109.683 ↑ 1.0 1 12,187

Index Scan using tbcategoriadeobjeto_pkey on tbcategoriadeobjeto (cost=0.15..8.17 rows=1 width=31) (actual time=0.009..0.009 rows=1 loops=12,187)

  • Index Cond: (pkincategoriadeobjeto = catob.fkincategoriadeobjeto)
28. 36.561 36.561 ↑ 1.0 1 12,187

Seq Scan on tbstatuslicitacao (cost=0.00..1.10 rows=1 width=178) (actual time=0.002..0.003 rows=1 loops=12,187)

  • Filter: (pkinstatuslicitacao = lic.fkinstatuslicitacao)
  • Rows Removed by Filter: 7