explain.depesz.com

PostgreSQL's explain analyze made readable

Result: UE8p

Settings
# exclusive inclusive rows x rows loops node
1. 4,437.467 4,844.509 ↑ 1.0 1 1

Aggregate (cost=192,105.81..192,105.84 rows=1 width=232) (actual time=4,844.508..4,844.509 rows=1 loops=1)

2.          

CTE medicoeseerros

3. 58.649 103.549 ↑ 1.0 135,005 1

Append (cost=0.00..3,955.68 rows=135,006 width=80) (actual time=0.006..103.549 rows=135,005 loops=1)

4. 44.190 44.190 ↑ 1.0 134,582 1

Seq Scan on ultimamedicao (cost=0.00..2,577.82 rows=134,582 width=51) (actual time=0.005..44.190 rows=134,582 loops=1)

5. 0.220 0.710 ↑ 1.0 423 1

Subquery Scan on *SELECT* 2 (cost=0.00..32.04 rows=424 width=80) (actual time=0.040..0.710 rows=423 loops=1)

6. 0.490 0.490 ↑ 1.0 423 1

Seq Scan on erromedicaoindicador (cost=0.00..26.74 rows=424 width=76) (actual time=0.037..0.490 rows=423 loops=1)

  • Filter: (datahora >= (('now'::cstring)::date - '1 mon'::interval))
  • Rows Removed by Filter: 11
7. 108.375 407.042 ↑ 1.0 135,005 1

Hash Join (cost=154.26..6,567.04 rows=135,006 width=74) (actual time=2.610..407.042 rows=135,005 loops=1)

  • Hash Cond: (medicaoindicador.unidadenegocioid = unidadenegocio.id)
8. 103.927 297.362 ↑ 1.0 135,005 1

Hash Join (cost=97.88..4,654.34 rows=135,006 width=74) (actual time=1.296..297.362 rows=135,005 loops=1)

  • Hash Cond: (medicaoindicador.indicadorid = indicador.id)
9. 192.153 192.153 ↑ 1.0 135,005 1

CTE Scan on medicoeseerros medicaoindicador (cost=0.00..2,700.12 rows=135,006 width=64) (actual time=0.008..192.153 rows=135,005 loops=1)

10. 0.138 1.282 ↓ 1.0 311 1

Hash (cost=94.06..94.06 rows=306 width=18) (actual time=1.282..1.282 rows=311 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 26kB
11. 0.142 1.144 ↓ 1.0 311 1

Hash Join (cost=18.17..94.06 rows=306 width=18) (actual time=0.301..1.144 rows=311 loops=1)

  • Hash Cond: (indicador.classificacaoinvestimentoid = classificacaoinvestimento.id)
12. 0.161 0.930 ↓ 1.0 311 1

Hash Join (cost=13.63..85.31 rows=306 width=26) (actual time=0.225..0.930 rows=311 loops=1)

  • Hash Cond: (indicador.classificacaoramoatividadeid = classificacaoramoatividade.id)
13. 0.177 0.701 ↓ 1.0 311 1

Hash Join (cost=9.09..76.56 rows=306 width=34) (actual time=0.147..0.701 rows=311 loops=1)

  • Hash Cond: (indicador.classificacaogestaoid = classificacaogestao.id)
14. 0.232 0.459 ↓ 1.0 311 1

Hash Join (cost=4.54..67.81 rows=306 width=42) (actual time=0.076..0.459 rows=311 loops=1)

  • Hash Cond: (indicador.classificacaodepartamentoid = classificacaodepartamento.id)
15. 0.160 0.160 ↓ 1.0 311 1

Seq Scan on indicador (cost=0.00..59.06 rows=306 width=50) (actual time=0.003..0.160 rows=311 loops=1)

16. 0.025 0.067 ↓ 1.1 119 1

Hash (cost=3.13..3.13 rows=113 width=8) (actual time=0.067..0.067 rows=119 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
17. 0.042 0.042 ↓ 1.1 119 1

Seq Scan on classificacaoindicador classificacaodepartamento (cost=0.00..3.13 rows=113 width=8) (actual time=0.003..0.042 rows=119 loops=1)

18. 0.017 0.065 ↓ 1.1 119 1

Hash (cost=3.13..3.13 rows=113 width=8) (actual time=0.065..0.065 rows=119 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
19. 0.048 0.048 ↓ 1.1 119 1

Seq Scan on classificacaoindicador classificacaogestao (cost=0.00..3.13 rows=113 width=8) (actual time=0.002..0.048 rows=119 loops=1)

20. 0.034 0.068 ↓ 1.1 119 1

Hash (cost=3.13..3.13 rows=113 width=8) (actual time=0.068..0.068 rows=119 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
21. 0.034 0.034 ↓ 1.1 119 1

Seq Scan on classificacaoindicador classificacaoramoatividade (cost=0.00..3.13 rows=113 width=8) (actual time=0.003..0.034 rows=119 loops=1)

22. 0.041 0.072 ↓ 1.1 119 1

Hash (cost=3.13..3.13 rows=113 width=8) (actual time=0.072..0.072 rows=119 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
23. 0.031 0.031 ↓ 1.1 119 1

Seq Scan on classificacaoindicador classificacaoinvestimento (cost=0.00..3.13 rows=113 width=8) (actual time=0.004..0.031 rows=119 loops=1)

24. 0.315 1.305 ↑ 1.1 947 1

Hash (cost=43.41..43.41 rows=1,037 width=8) (actual time=1.305..1.305 rows=947 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 53kB
25. 0.592 0.990 ↑ 1.1 947 1

Hash Join (cost=8.13..43.41 rows=1,037 width=8) (actual time=0.176..0.990 rows=947 loops=1)

  • Hash Cond: (unidadenegocio.organizacaoid = organizacao.id)
26. 0.239 0.239 ↑ 1.1 947 1

Seq Scan on unidadenegocio (cost=0.00..22.37 rows=1,037 width=16) (actual time=0.010..0.239 rows=947 loops=1)

27. 0.071 0.159 ↓ 1.2 269 1

Hash (cost=5.28..5.28 rows=228 width=8) (actual time=0.159..0.159 rows=269 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 19kB
28. 0.088 0.088 ↓ 1.2 269 1

Seq Scan on organizacao (cost=0.00..5.28 rows=228 width=8) (actual time=0.005..0.088 rows=269 loops=1)