explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9Mc2

Settings
# exclusive inclusive rows x rows loops node
1. 1,359.409 16,265.696 ↑ 14.9 3,793,133 1

Hash Right Join (cost=2,661,826.87..7,398,772.65 rows=56,562,358 width=34) (actual time=15,044.493..16,265.696 rows=3,793,133 loops=1)

  • Hash Cond: ((operadora_new.hospital_id = hospital.id) AND (operadora_new.codigo = operadora.codigo))
  • Functions: 25
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 7.958 ms, Inlining 18.020 ms, Optimization 176.479 ms, Emission 116.344 ms, Total 318.801 ms
2. 3.883 3.883 ↑ 1.0 2,880 1

Seq Scan on operadora operadora_new (cost=0.00..61.80 rows=2,880 width=14) (actual time=0.111..3.883 rows=2,880 loops=1)

3. 1,151.133 14,902.404 ↑ 14.7 2,692,386 1

Hash (cost=1,798,208.30..1,798,208.30 rows=39,550,305 width=32) (actual time=14,902.404..14,902.404 rows=2,692,386 loops=1)

  • Buckets: 65536 Batches: 1024 Memory Usage: 1103kB
4. 429.294 13,751.271 ↑ 14.7 2,692,386 1

Nested Loop (cost=97.80..1,798,208.30 rows=39,550,305 width=32) (actual time=312.956..13,751.271 rows=2,692,386 loops=1)

5. 12.160 13,137.567 ↑ 14.7 36,882 1

Hash Left Join (cost=97.80..1,303,826.57 rows=541,785 width=28) (actual time=312.931..13,137.567 rows=36,882 loops=1)

  • Hash Cond: (pagamento.operadora_id = operadora.id)
6. 12,812.738 12,812.738 ↑ 14.7 36,882 1

Seq Scan on pagamento (cost=0.00..1,302,304.85 rows=541,785 width=34) (actual time=0.121..12,812.738 rows=36,882 loops=1)

7. 0.452 312.669 ↑ 1.0 2,880 1

Hash (cost=61.80..61.80 rows=2,880 width=6) (actual time=312.669..312.669 rows=2,880 loops=1)

  • Buckets: 4096 Batches: 1 Memory Usage: 142kB
8. 312.217 312.217 ↑ 1.0 2,880 1

Seq Scan on operadora (cost=0.00..61.80 rows=2,880 width=6) (actual time=311.382..312.217 rows=2,880 loops=1)

9. 184.355 184.410 ↑ 1.0 73 36,882

Materialize (cost=0.00..3.09 rows=73 width=4) (actual time=0.000..0.005 rows=73 loops=36,882)

10. 0.055 0.055 ↑ 1.0 73 1

Seq Scan on hospital (cost=0.00..2.73 rows=73 width=4) (actual time=0.017..0.055 rows=73 loops=1)

Execution time : 16,471.937 ms