explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 05Sz : Inadimplência - Parcelas Pagos x Parcelas Não Pagos

Settings
# exclusive inclusive rows x rows loops node
1. 0.154 12,941.192 ↑ 6,666.5 46 1

Sort (cost=204,036.1..204,802.75 rows=306,658 width=214) (actual time=12,941.183..12,941.192 rows=46 loops=1)

  • Sort Key: inst.nome, (to_char(ped.data_pedido, 'YYYY-MM'::text))
  • Sort Method: quicksort Memory: 28kB
  • Buffers: shared hit=1352178, temp read=3984 written=3978
2. 327.800 12,941.038 ↑ 6,666.5 46 1

GroupAggregate (cost=98,628.69..110,128.36 rows=306,658 width=214) (actual time=12,392.545..12,941.038 rows=46 loops=1)

  • Group Key: (to_char(ped.data_pedido, 'YYYY-MM'::text)), inst.nome
  • Buffers: shared hit=1352178, temp read=3984 written=3978
3. 1,704.327 12,613.238 ↑ 1.2 251,050 1

Sort (cost=98,628.69..99,395.33 rows=306,658 width=184) (actual time=12,325.037..12,613.238 rows=251,050 loops=1)

  • Sort Key: (to_char(ped.data_pedido, 'YYYY-MM'::text)), inst.nome
  • Sort Method: external merge Disk: 14016kB
  • Buffers: shared hit=1352178, temp read=3984 written=3978
4. 2,097.247 10,908.911 ↑ 1.2 251,050 1

Nested Loop (cost=7,055.77..16,173.53 rows=306,658 width=184) (actual time=2,069.668..10,908.911 rows=251,050 loops=1)

  • Buffers: shared hit=1352178, temp read=2232 written=2220
5. 720.580 5,241.536 ↓ 572.1 446,266 1

Hash Join (cost=7,055.48..15,090.29 rows=780 width=180) (actual time=2,069.551..5,241.536 rows=446,266 loops=1)

  • Buffers: shared hit=9407, temp read=2232 written=2220
6. 1,070.111 4,520.525 ↓ 572.1 446,266 1

Hash Join (cost=7,018.53..15,049.25 rows=780 width=180) (actual time=2,069.109..4,520.525 rows=446,266 loops=1)

  • Buffers: shared hit=9384, temp read=2232 written=2220
7. 388.202 3,450.052 ↓ 572.1 446,266 1

Gather (cost=6,997.49..15,022.06 rows=780 width=180) (actual time=2,068.737..3,450.052 rows=446,266 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=9378, temp read=2232 written=2220
8. 566.048 3,061.850 ↓ 457.7 148,755 3 / 3

Hash Join (cost=5,997.49..13,944.06 rows=325 width=180) (actual time=2,176.329..3,061.85 rows=148,755 loops=3)

  • Buffers: shared hit=9378, temp read=2232 written=2220
9. 319.546 319.546 ↑ 1.2 151,148 3 / 3

Seq Scan on parcela parc (cost=0..7,240.18 rows=187,506 width=38) (actual time=0.005..319.546 rows=151,148 loops=3)

  • Filter: ((parc.status)::text <> 'renegociado'::text)
  • Buffers: shared hit=4731
10. 80.871 2,176.256 ↓ 499.2 34,941 3 / 3

Hash (cost=5,996.61..5,996.61 rows=70 width=150) (actual time=2,176.256..2,176.256 rows=34,941 loops=3)

  • Buffers: shared hit=4551, temp read=2232 written=2220
11. 468.786 2,095.385 ↓ 499.2 34,941 3 / 3

Hash Join (cost=5,077.33..5,996.61 rows=70 width=150) (actual time=1,539.392..2,095.385 rows=34,941 loops=3)

  • Buffers: shared hit=4551, temp read=2232 written=2220
12. 87.505 87.505 ↑ 1.0 40,169 3 / 3

Seq Scan on forma_pagamento forpag (cost=0..767.06 rows=40,406 width=8) (actual time=0.009..87.505 rows=40,169 loops=3)

  • Buffers: shared hit=1089
13. 206.217 1,539.094 ↓ 504.2 65,542 3 / 3

Hash (cost=5,075.71..5,075.71 rows=130 width=150) (actual time=1,539.093..1,539.094 rows=65,542 loops=3)

  • Buffers: shared hit=3462, temp read=1026 written=1740
14. 549.695 1,332.877 ↓ 504.2 65,542 3 / 3

Hash Join (cost=2,076.5..5,075.71 rows=130 width=150) (actual time=337.683..1,332.877 rows=65,542 loops=3)

  • Buffers: shared hit=3462, temp read=1026 written=1020
15. 235.713 445.743 ↑ 1.0 72,836 3 / 3

Hash Join (cost=21.93..1,895.42 rows=74,961 width=134) (actual time=0.029..445.743 rows=72,836 loops=3)

  • Buffers: shared hit=2208
16. 210.018 210.018 ↑ 1.0 72,836 3 / 3

Seq Scan on pagamento pag (cost=0..1,675.15 rows=74,961 width=12) (actual time=0.008..210.018 rows=72,836 loops=3)

  • Filter: (pag.tipo_pagamento = 1)
  • Buffers: shared hit=2205
17. 0.005 0.012 ↑ 265.0 2 3 / 3

Hash (cost=15.3..15.3 rows=530 width=122) (actual time=0.012..0.012 rows=2 loops=3)

  • Buffers: shared hit=3
18. 0.007 0.007 ↑ 265.0 2 3 / 3

Seq Scan on instituicao inst (cost=0..15.3 rows=530 width=122) (actual time=0.006..0.007 rows=2 loops=3)

  • Buffers: shared hit=3
19. 193.138 337.439 ↓ 1.0 65,542 3 / 3

Hash (cost=1,072.63..1,072.63 rows=65,463 width=16) (actual time=337.439..337.439 rows=65,542 loops=3)

  • Buffers: shared hit=1254, temp written=429
20. 144.301 144.301 ↓ 1.0 65,542 3 / 3

Seq Scan on pedido_oferta pof (cost=0..1,072.63 rows=65,463 width=16) (actual time=0.01..144.301 rows=65,542 loops=3)

  • Buffers: shared hit=1254
21. 0.192 0.362 ↑ 1.1 507 1

Hash (cost=11.47..11.47 rows=547 width=16) (actual time=0.361..0.362 rows=507 loops=1)

  • Buffers: shared hit=6
22. 0.170 0.170 ↑ 1.1 507 1

Seq Scan on oferta ofe (cost=0..11.47 rows=547 width=16) (actual time=0.005..0.17 rows=507 loops=1)

  • Buffers: shared hit=6
23. 0.196 0.431 ↑ 1.0 558 1

Hash (cost=28.58..28.58 rows=558 width=8) (actual time=0.43..0.431 rows=558 loops=1)

  • Buffers: shared hit=23
24. 0.235 0.235 ↑ 1.0 558 1

Seq Scan on curso curs (cost=0..28.58 rows=558 width=8) (actual time=0.01..0.235 rows=558 loops=1)

  • Buffers: shared hit=23
25. 3,570.128 3,570.128 ↑ 1.0 1 446,266

Index Scan using pk_pedido on pedido ped (cost=0.29..0.39 rows=1 width=16) (actual time=0.008..0.008 rows=1 loops=446,266)

  • Index Cond: ((ped.codigo = pag.codigo_pedido) AND (ped.instituicao = pag.instituicao))
  • Filter: ((ped.status)::text = 'wc-completed'::text)
  • Buffers: shared hit=1342771
Planning time : 854.729 ms
Execution time : 12,943.419 ms