explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8hcn

Settings
# exclusive inclusive rows x rows loops node
1. 0.094 3,775.645 ↑ 3.0 23 1

Hash Join (cost=147,283.20..147,316.63 rows=69 width=32) (actual time=3,775.449..3,775.645 rows=23 loops=1)

  • Hash Cond: (a.cod_nat = b.cod_nat)
2. 0.212 0.212 ↑ 1.0 23 1

Seq Scan on reg_0400 a (cost=0.00..29.39 rows=24 width=279) (actual time=0.068..0.212 rows=23 loops=1)

  • Filter: (fk_0000 = 4)
  • Rows Removed by Filter: 506
3. 0.037 3,775.339 ↑ 24.0 24 1

Hash (cost=147,276.00..147,276.00 rows=576 width=15) (actual time=3,775.339..3,775.339 rows=24 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
4. 0.011 3,775.302 ↑ 24.0 24 1

Subquery Scan on b (cost=147,264.48..147,276.00 rows=576 width=15) (actual time=3,775.282..3,775.302 rows=24 loops=1)

5. 165.752 3,775.291 ↑ 24.0 24 1

HashAggregate (cost=147,264.48..147,270.24 rows=576 width=15) (actual time=3,775.280..3,775.291 rows=24 loops=1)

  • Group Key: b_1.fk_0000, b_1.cod_nat
6. 441.934 3,609.539 ↑ 1.0 267,331 1

Hash Join (cost=101,819.09..145,904.07 rows=272,083 width=15) (actual time=2,969.604..3,609.539 rows=267,331 loops=1)

  • Hash Cond: (b_1.fk_c100 = a_1.id)
7. 214.669 214.669 ↑ 1.0 267,331 1

Index Scan using reg_c170_fk_0000_idx on reg_c170 b_1 (cost=0.43..39,989.36 rows=275,044 width=19) (actual time=0.191..214.669 rows=267,331 loops=1)

  • Index Cond: (fk_0000 = 4)
8. 906.034 2,952.936 ↑ 1.0 1,514,190 1

Hash (cost=82,874.91..82,874.91 rows=1,515,500 width=4) (actual time=2,952.936..2,952.936 rows=1,514,190 loops=1)

  • Buckets: 2097152 Batches: 1 Memory Usage: 69618kB
9. 2,046.902 2,046.902 ↑ 1.0 1,514,190 1

Seq Scan on reg_c100 a_1 (cost=0.00..82,874.91 rows=1,515,500 width=4) (actual time=0.076..2,046.902 rows=1,514,190 loops=1)

  • Filter: (cod_sit <> ALL ('{02,03,04,05}'::bpchar[]))
  • Rows Removed by Filter: 16402