explain.depesz.com

PostgreSQL's explain analyze made readable

Result: tfF : Optimization for: plan #d3U9

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 55.012 ↑ 11.4 71 1

Sort (cost=146.63..148.65 rows=808 width=138) (actual time=55.009..55.012 rows=71 loops=1)

  • Sort Key: n.nspname, p.proname, (pg_get_function_arguments(p.oid))
  • Sort Method: quicksort Memory: 43kB
  • Hash Cond: (a.cod_nat = b.cod_nat)
2. 0.000 54.854 ↑ 11.4 71 1

Hash Join (cost=1.14..107.61 rows=808 width=138) (actual time=42.495..54.854 rows=71 loops=1)

3. 87,972.277 87,972.277 ↑ 3.0 23 1

Hash Cond: (p.pronamespace = n.oid)"Hash Join (cost=578,585.07..578,618.50 rows=69 width=32) (actual time=87,971.980..87,972.277 rows=23 loops=1)

4. 0.293 0.293 ↑ 1.0 23 1

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

  • Filter: ((cod_nat IS NOT NULL) AND (fk_0000 = 4))
  • Rows Removed by Filter: 506
5. 0.056 87,971.844 ↑ 24.0 24 1

Hash (cost=578,577.87..578,577.87 rows=576 width=15) (actual time=87,971.844..87,971.844 rows=24 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 10kB
6. 0.000 87,971.788 ↑ 24.0 24 1

Subquery Scan on b (cost=578,566.35..578,577.87 rows=576 width=15) (actual time=87,971.757..87,971.788 rows=24 loops=1)

7. 115.089 87,971.770 ↑ 24.0 24 1

HashAggregate (cost=578,566.35..578,572.11 rows=576 width=15) (actual time=87,971.754..87,971.770 rows=24 loops=1)

  • Group Key: b_1.fk_0000, b_1.cod_nat
8. 174.615 87,856.681 ↑ 1.2 267,331 1

Hash Join (cost=101,818.66..577,000.84 rows=313,102 width=15) (actual time=9,925.908..87,856.681 rows=267,331 loops=1)

  • Hash Cond: (b_1.fk_c100 = a_1.id)
9. 84,681.000 84,681.000 ↑ 1.2 267,331 1

Seq Scan on reg_c170 b_1 (cost=0.00..470,468.61 rows=316,510 width=19) (actual time=6,908.158..84,681.000 rows=267,331 loops=1)

  • Filter: ((cod_nat IS NOT NULL) AND (fk_0000 = 4))
  • Rows Removed by Filter: 3343752
10. 950.657 3,001.066 ↑ 1.0 1,514,190 1

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

  • Buckets: 2097152 Batches: 1 Memory Usage: 69618kB
11. 2,050.409 2,050.409 ↑ 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.080..2,050.409 rows=1,514,190 loops=1)

  • Filter: (cod_sit <> ALL ('{02,03,04,05}'::bpchar[]))
  • Rows Removed by Filter: 16402
12. 53.465 53.465 ↓ 3.0 2,402 1

Seq Scan on pg_proc p (cost=0.00..89.30 rows=808 width=78) (actual time=0.052..53.465 rows=2,402 loops=1)

  • Filter: pg_function_is_visible(oid)
13. 0.004 0.011 ↑ 1.0 4 1

Hash (cost=1.09..1.09 rows=4 width=68) (actual time=0.011..0.011 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 1kB
14. 0.007 0.007 ↑ 1.0 4 1

Seq Scan on pg_namespace n (cost=0.00..1.09 rows=4 width=68) (actual time=0.005..0.007 rows=4 loops=1)

  • Filter: ((nspname <> 'pg_catalog'::name) AND (nspname <> 'information_schema'::name))