Optimization inner join

From: Clailson <clailson(dot)dba(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Optimization inner join
Date: 2017-01-19 00:36:21
Message-ID: e6a8fab7-04d5-1a7e-f23f-5cd74be83341@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

Is there something in the roadmap to optimize the inner join?

I've this situation above. Table b has 400 rows with null in the column b.

explain analyze select * from a inner join b on (b.b = a.a);

"Merge Join (cost=0.55..65.30 rows=599 width=16) (actual time=0.030..1.173 rows=599 loops=1)"
" Merge Cond: (a.a = b.b)"
" -> Index Scan using a_pkey on a (cost=0.28..35.27 rows=1000 width=8) (actual time=0.014..0.364 rows=1000 loops=1)"
" -> Index Scan using in01 on b (cost=0.28..33.27 rows=1000 width=8) (actual time=0.012..0.249 rows=600 loops=1)"
"Total runtime: 1.248 ms"

My question is: Why the planner isn't removing the null rows during the
scan of table b?

--
Clailson Soares Dinízio de Almeida

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2017-01-19 01:27:56 Re: BUG #14505: explain verbose for postgresql_fdw
Previous Message jeff.janes 2017-01-18 23:43:59 BUG #14505: explain verbose for postgresql_fdw