explain.depesz.com

PostgreSQL's explain analyze made readable

Result: zeFr : Inadimplência Pós - Query - Join

Settings
# exclusive inclusive rows x rows loops node
1. 114.413 1,725.975 ↑ 21.9 7,235 1

GroupAggregate (cost=46,512.74..52,050.93 rows=158,234 width=64) (actual time=1,581.931..1,725.975 rows=7,235 loops=1)

  • Group Key: p.instituicao, p.codigo, po.codigo_oferta
  • Filter: (count(p.codigo) > 1)
  • Buffers: shared hit=7143, temp read=327 written=328
2. 220.921 1,611.562 ↑ 2.4 65,914 1

Sort (cost=46,512.74..46,908.33 rows=158,234 width=26) (actual time=1,581.898..1,611.562 rows=65,914 loops=1)

  • Sort Key: p.instituicao, p.codigo, po.codigo_oferta
  • Sort Method: external merge Disk: 2616kB
  • Buffers: shared hit=7143, temp read=327 written=328
3. 197.513 1,390.641 ↑ 2.4 65,914 1

Hash Join (cost=9,832.73..29,060.89 rows=158,234 width=26) (actual time=529.514..1,390.641 rows=65,914 loops=1)

  • Buffers: shared hit=7143
4. 663.673 663.673 ↑ 1.1 201,951 1

Seq Scan on parcela par (cost=0..16,775.05 rows=232,207 width=10) (actual time=0.01..663.673 rows=201,951 loops=1)

  • Filter: ((par.data_pagamento IS NULL) AND (par.data_vencimento < now()) AND ((par.status)::text = ANY ('{pago,atrasado,"não concluído",cancelado,"não confirmado",estornado,registrado,"não registrado"}'::text[])))
  • Buffers: shared hit=4731
5. 18.119 529.455 ↑ 1.3 20,934 1

Hash (cost=9,488.55..9,488.55 rows=27,534 width=24) (actual time=529.455..529.455 rows=20,934 loops=1)

  • Buffers: shared hit=2412
6. 33.425 511.336 ↑ 1.3 20,934 1

Hash Join (cost=7,126.93..9,488.55 rows=27,534 width=24) (actual time=389.121..511.336 rows=20,934 loops=1)

  • Buffers: shared hit=2412
7. 45.560 477.556 ↑ 1.3 20,934 1

Hash Join (cost=7,105.89..9,250.12 rows=27,534 width=36) (actual time=388.76..477.556 rows=20,934 loops=1)

  • Buffers: shared hit=2406
8. 43.280 43.280 ↓ 1.0 65,542 1

Seq Scan on pedido_oferta po (cost=0..1,072.63 rows=65,463 width=16) (actual time=0.005..43.28 rows=65,542 loops=1)

  • Buffers: shared hit=418
9. 18.841 388.716 ↑ 1.4 22,299 1

Hash (cost=6,644.97..6,644.97 rows=30,728 width=28) (actual time=388.716..388.716 rows=22,299 loops=1)

  • Buffers: shared hit=1988
10. 86.071 369.875 ↑ 1.4 22,299 1

Hash Join (cost=3,911.49..6,644.97 rows=30,728 width=28) (actual time=152.179..369.875 rows=22,299 loops=1)

  • Buffers: shared hit=1988
11. 65.863 236.788 ↑ 1.0 55,427 1

Hash Join (cost=2,639.36..4,708.07 rows=57,198 width=28) (actual time=105.095..236.788 rows=55,427 loops=1)

  • Buffers: shared hit=1625
12. 66.070 66.070 ↑ 1.0 72,836 1

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

  • Filter: (pag.tipo_pagamento = 1)
  • Buffers: shared hit=735
13. 43.354 104.855 ↑ 1.0 55,427 1

Hash (cost=1,803.2..1,803.2 rows=55,744 width=16) (actual time=104.855..104.855 rows=55,427 loops=1)

  • Buffers: shared hit=890
14. 61.501 61.501 ↑ 1.0 55,427 1

Seq Scan on pedido p (cost=0..1,803.2 rows=55,744 width=16) (actual time=0.008..61.501 rows=55,427 loops=1)

  • Filter: ((p.status)::text = 'wc-completed'::text)
  • Buffers: shared hit=890
15. 34.552 47.016 ↑ 1.0 40,169 1

Hash (cost=767.06..767.06 rows=40,406 width=8) (actual time=47.015..47.016 rows=40,169 loops=1)

  • Buffers: shared hit=363
16. 12.464 12.464 ↑ 1.0 40,169 1

Seq Scan on forma_pagamento forpag (cost=0..767.06 rows=40,406 width=8) (actual time=0.005..12.464 rows=40,169 loops=1)

  • Buffers: shared hit=363
17. 0.186 0.355 ↑ 1.1 507 1

Hash (cost=11.47..11.47 rows=547 width=12) (actual time=0.354..0.355 rows=507 loops=1)

  • Buffers: shared hit=6
18. 0.169 0.169 ↑ 1.1 507 1

Seq Scan on oferta ofer (cost=0..11.47 rows=547 width=12) (actual time=0.006..0.169 rows=507 loops=1)

  • Buffers: shared hit=6
Planning time : 2.801 ms
Execution time : 1,729.005 ms