explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jCEs

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.019 99,223.239 ↑ 1.0 100 1

Limit (cost=2,521,846.71..2,521,852.21 rows=100 width=119) (actual time=99,222.816..99,223.239 rows=100 loops=1)

  • Buffers: shared hit=25636 read=463374, temp read=72360 written=130446
2. 0.347 99,223.220 ↑ 112,868.4 100 1

GroupAggregate (cost=2,521,846.71..3,142,622.74 rows=11,286,837 width=119) (actual time=99,222.815..99,223.220 rows=100 loops=1)

  • Group Key: a.idproduto, b.dataentsai
  • Buffers: shared hit=25636 read=463374, temp read=72360 written=130446
3. 51,303.013 99,222.873 ↑ 74,747.3 151 1

Sort (cost=2,521,846.71..2,550,063.80 rows=11,286,837 width=29) (actual time=99,222.781..99,222.873 rows=151 loops=1)

  • Sort Key: a.idproduto, b.dataentsai
  • Sort Method: external merge Disk: 485352kB
  • Buffers: shared hit=25636 read=463374, temp read=72360 written=130446
4. 9,190.839 47,919.860 ↓ 1.0 11,462,924 1

Hash Join (cost=70,186.43..929,649.34 rows=11,286,837 width=29) (actual time=2,488.364..47,919.860 rows=11,462,924 loops=1)

  • Hash Cond: ((a.idnfmaster)::text = (b.idnfmaster)::text)
  • Buffers: shared hit=25636 read=463374, temp read=69728 written=69722
5. 36,265.691 36,265.691 ↑ 1.0 11,467,464 1

Seq Scan on nfdet a (cost=0.00..622,575.65 rows=11,472,418 width=42) (actual time=24.196..36,265.691 rows=11,467,464 loops=1)

  • Filter: ((cancelado = 0) OR (cancelado = '-1'::integer))
  • Rows Removed by Filter: 140379
  • Buffers: shared hit=25601 read=422857
6. 364.097 2,463.330 ↓ 1.0 747,637 1

Hash (cost=55,739.68..55,739.68 rows=747,100 width=29) (actual time=2,463.330..2,463.330 rows=747,637 loops=1)

  • Buckets: 524288 Batches: 4 Memory Usage: 15402kB
  • Buffers: shared hit=35 read=40517, temp written=3408
7. 2,099.233 2,099.233 ↓ 1.0 747,637 1

Seq Scan on nfmaster b (cost=0.00..55,739.68 rows=747,100 width=29) (actual time=10.799..2,099.233 rows=747,637 loops=1)

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