Hello all,

I got the following result.
It's FAQ ?

drop table int2t;
create table int2t (id int2 primary key);

explain select * from int2t where id=1;
  NOTICE:  QUERY PLAN:

  Seq Scan on int2t  (cost=43.00 rows=2 width=2) 

explain select * from int2t where id=1::int2;
  NOTICE:  QUERY PLAN:

  Index Scan using int2t_pkey on int2t  (cost=2.05 rows=2 width=2) 

explain select * from int2t where id='1';
  NOTICE:  QUERY PLAN:

  Index Scan using int2t_pkey on int2t  (cost=2.05 rows=2 width=2) 

Right behavior ?

Regards.

Hiroshi Inoue
Inoue@tpf.co.jp

Fri, 2 Jul 1999 09:14:10 +0900
"Hiroshi Inoue" <Inoue@tpf.co.jp>
Optimization FAQ ?