explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bxfr : Evasão - Total

Settings
# exclusive inclusive rows x rows loops node
1. 0.052 2,927.305 ↑ 1.0 1 1

Aggregate (cost=22,126.65..22,126.67 rows=1 width=96) (actual time=2,927.304..2,927.305 rows=1 loops=1)

  • Buffers: shared hit=2073, temp read=676 written=675
2. 82.897 2,927.253 ↑ 494.0 108 1

GroupAggregate (cost=19,192.17..20,926.18 rows=53,354 width=170) (actual time=2,788.883..2,927.253 rows=108 loops=1)

  • Group Key: (to_char(ped.data_pedido, 'YYYY-MM'::text)), inst.nome, curs.duracao_meses_titulo
  • Buffers: shared hit=2073, temp read=676 written=675
3. 544.918 2,844.356 ↓ 1.0 53,790 1

Sort (cost=19,192.17..19,325.56 rows=53,354 width=166) (actual time=2,787.525..2,844.356 rows=53,790 loops=1)

  • Sort Key: (to_char(ped.data_pedido, 'YYYY-MM'::text)), inst.nome, curs.duracao_meses_titulo
  • Sort Method: external merge Disk: 2264kB
  • Buffers: shared hit=2073, temp read=676 written=675
4. 219.559 2,299.438 ↓ 1.0 53,790 1

Hash Join (cost=4,934.06..10,624.5 rows=53,354 width=166) (actual time=300.879..2,299.438 rows=53,790 loops=1)

  • Buffers: shared hit=2073, temp read=393 written=391
5. 520.968 2,079.350 ↓ 1.0 53,790 1

Hash Join (cost=4,897.11..10,174.06 rows=53,354 width=158) (actual time=300.331..2,079.35 rows=53,790 loops=1)

  • Buffers: shared hit=2050, temp read=393 written=391
6. 100.633 1,558.025 ↓ 1.0 53,790 1

Hash Join (cost=4,876.07..9,732.85 rows=53,354 width=158) (actual time=299.965..1,558.025 rows=53,790 loops=1)

  • Buffers: shared hit=2044, temp read=393 written=391
7. 977.591 1,296.420 ↓ 1.0 53,790 1

Hash Join (cost=2,076.5..4,931.45 rows=53,354 width=162) (actual time=138.926..1,296.42 rows=53,790 loops=1)

  • Buffers: shared hit=1309, temp read=393 written=391
8. 60.930 180.133 ↑ 1.0 59,420 1

Hash Join (cost=21.93..1,982.67 rows=59,543 width=150) (actual time=0.022..180.133 rows=59,420 loops=1)

  • Buffers: shared hit=891
9. 119.192 119.192 ↑ 1.0 59,420 1

Seq Scan on pedido ped (cost=0..1,803.2 rows=59,543 width=28) (actual time=0.006..119.192 rows=59,420 loops=1)

  • Filter: ((ped.status)::text = ANY ('{wc-cancelled,wc-completed}'::text[]))
  • Buffers: shared hit=890
10. 0.008 0.011 ↑ 265.0 2 1

Hash (cost=15.3..15.3 rows=530 width=122) (actual time=0.011..0.011 rows=2 loops=1)

  • Buffers: shared hit=1
11. 0.003 0.003 ↑ 265.0 2 1

Seq Scan on instituicao inst (cost=0..15.3 rows=530 width=122) (actual time=0.002..0.003 rows=2 loops=1)

  • Buffers: shared hit=1
12. 65.804 138.696 ↓ 1.0 65,542 1

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

  • Buffers: shared hit=418, temp written=143
13. 72.892 72.892 ↓ 1.0 65,542 1

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

  • Buffers: shared hit=418
14. 52.008 160.972 ↑ 1.0 72,836 1

Hash (cost=1,675.15..1,675.15 rows=74,961 width=8) (actual time=160.972..160.972 rows=72,836 loops=1)

  • Buffers: shared hit=735
15. 108.964 108.964 ↑ 1.0 72,836 1

Seq Scan on pagamento pag (cost=0..1,675.15 rows=74,961 width=8) (actual time=0.011..108.964 rows=72,836 loops=1)

  • Filter: (pag.tipo_pagamento = 1)
  • Buffers: shared hit=735
16. 0.190 0.357 ↑ 1.1 507 1

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

  • Buffers: shared hit=6
17. 0.167 0.167 ↑ 1.1 507 1

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

  • Buffers: shared hit=6
18. 0.232 0.529 ↑ 1.0 558 1

Hash (cost=28.58..28.58 rows=558 width=12) (actual time=0.529..0.529 rows=558 loops=1)

  • Buffers: shared hit=23
19. 0.297 0.297 ↑ 1.0 558 1

Seq Scan on curso curs (cost=0..28.58 rows=558 width=12) (actual time=0.006..0.297 rows=558 loops=1)

  • Buffers: shared hit=23
Planning time : 2.981 ms
Execution time : 2,927.877 ms