explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oaWmi

Settings
# exclusive inclusive rows x rows loops node
1. 56.683 22,040.117 ↓ 4.4 22,257 1

HashAggregate (cost=164,667.07..169,669.07 rows=5,002 width=214) (actual time=22,020.958..22,040.117 rows=22,257 loops=1)

  • Group Key: prod.id, gui.id, hasg.id
  • Buffers: shared hit=7644 read=2398
2. 11.460 21,983.434 ↓ 4.4 22,257 1

Hash Join (cost=565.00..152,162.07 rows=5,002 width=164) (actual time=223.259..21,983.434 rows=22,257 loops=1)

  • Hash Cond: (prod.prodconvnome = f.convnome)
  • Buffers: shared hit=7644 read=2398
3. 9.103 21,971.817 ↓ 4.4 22,257 1

Nested Loop (cost=314.50..145,659.07 rows=5,002 width=164) (actual time=223.073..21,971.817 rows=22,257 loops=1)

  • Buffers: shared hit=7633 read=2398
4. 0.906 2,208.395 ↓ 2.8 1,007 1

Nested Loop (cost=227.00..44,820.46 rows=360 width=97) (actual time=119.578..2,208.395 rows=1,007 loops=1)

  • Buffers: shared hit=3082 read=177
5. 0.435 1,142.040 ↓ 1.5 707 1

Nested Loop (cost=141.00..3,251.73 rows=469 width=42) (actual time=31.257..1,142.040 rows=707 loops=1)

  • Buffers: shared hit=15 read=108
6. 7.745 7.745 ↑ 1.0 1 1

Index Scan using fibocompetencia_comp_desc_convenio_unique on fibocompetencia comp (cost=55.50..60.50 rows=1 width=16) (actual time=7.744..7.745 rows=1 loops=1)

  • Index Cond: ((comp_convenio = 'Medi Service'::text) AND (comp_desc = '05-2018'::text))
  • Buffers: shared hit=1 read=2
7. 1,133.860 1,133.860 ↓ 1.4 707 1

Index Scan using idx_fiboguia_guicompetencia_idx on fiboguia gui (cost=85.50..2,932.23 rows=518 width=42) (actual time=23.510..1,133.860 rows=707 loops=1)

  • Index Cond: (guicompetencia = comp.id)
  • Filter: (guiassociada AND (guistatusconciliacao = 'Fechada'::text))
  • Rows Removed by Filter: 67
  • Buffers: shared hit=14 read=106
8. 1,065.449 1,065.449 ↑ 1.0 1 707

Index Scan using idx_historico_alteracao_status_guia_guia_status_novo_idx on historico_alteracao_status_guia hasg (cost=86.00..88.13 rows=1 width=55) (actual time=1.261..1.507 rows=1 loops=707)

  • Index Cond: ((guia = gui.id) AND (status_novo = 'Fechada'::text))
  • Buffers: shared hit=3067 read=69
9. 19,754.319 19,754.319 ↑ 4.0 22 1,007

Index Scan using idx_fiboproduto_prodguia_idx on fiboproduto prod (cost=87.50..236.61 rows=87 width=83) (actual time=3.885..19.617 rows=22 loops=1,007)

  • Index Cond: (prodguia = gui.id)
  • Filter: prodassociado
  • Rows Removed by Filter: 1
  • Buffers: shared hit=4551 read=2221
10. 0.042 0.157 ↑ 1.0 156 1

Hash (cost=94.50..94.50 rows=156 width=12) (actual time=0.157..0.157 rows=156 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 15kB
  • Buffers: shared hit=11
11. 0.115 0.115 ↑ 1.0 156 1

Seq Scan on fiboconvenio f (cost=0.00..94.50 rows=156 width=12) (actual time=0.009..0.115 rows=156 loops=1)

  • Buffers: shared hit=11
Planning time : 293.328 ms
Execution time : 22,043.717 ms