explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EKDd : Optimization for: Optimization for: plan #jCEs; plan #fXmk

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.019 98,120.633 ↑ 1.0 100 1

Limit (cost=2,524,350.31..2,524,355.81 rows=100 width=119) (actual time=98,120.211..98,120.633 rows=100 loops=1)

  • Buffers: shared hit=25828 read=463182, temp read=72355 written=130442
2. 0.350 98,120.614 ↑ 113,031.9 100 1

GroupAggregate (cost=2,524,350.31..3,146,025.87 rows=11,303,192 width=119) (actual time=98,120.209..98,120.614 rows=100 loops=1)

  • Group Key: a.idproduto, b.dataentsai
  • Buffers: shared hit=25828 read=463182, temp read=72355 written=130442
3. 53,761.272 98,120.264 ↑ 74,855.6 151 1

Sort (cost=2,524,350.31..2,552,608.29 rows=11,303,192 width=29) (actual time=98,120.173..98,120.264 rows=151 loops=1)

  • Sort Key: a.idproduto, b.dataentsai
  • Sort Method: external merge Disk: 485360kB
  • Buffers: shared hit=25828 read=463182, temp read=72355 written=130442
4. 12,848.905 44,358.992 ↓ 1.0 11,462,924 1

Hash Join (cost=70,224.32..929,730.55 rows=11,303,192 width=29) (actual time=2,596.214..44,358.992 rows=11,462,924 loops=1)

  • Hash Cond: ((a.idnfmaster)::text = (b.idnfmaster)::text)
  • Buffers: shared hit=25828 read=463182, temp read=69723 written=69717
5. 28,932.762 28,932.762 ↑ 1.0 11,467,464 1

Seq Scan on nfdet a (cost=0.00..622,613.52 rows=11,472,205 width=42) (actual time=18.294..28,932.762 rows=11,467,464 loops=1)

  • Filter: ((cancelado = 0) OR (cancelado = '-1'::integer))
  • Rows Removed by Filter: 140379
  • Buffers: shared hit=25697 read=422761
6. 373.140 2,577.325 ↑ 1.0 747,637 1

Hash (cost=55,748.46..55,748.46 rows=748,629 width=29) (actual time=2,577.325..2,577.325 rows=747,637 loops=1)

  • Buckets: 524288 Batches: 4 Memory Usage: 15402kB
  • Buffers: shared hit=131 read=40421, temp written=3408
7. 2,204.185 2,204.185 ↑ 1.0 747,637 1

Seq Scan on nfmaster b (cost=0.00..55,748.46 rows=748,629 width=29) (actual time=11.066..2,204.185 rows=747,637 loops=1)

  • Filter: (((situacao = 0) OR (situacao = '-1'::integer)) AND (dataentsai < CURRENT_DATE))
  • Rows Removed by Filter: 11747
  • Buffers: shared hit=131 read=40421
Planning time : 0.821 ms