Constantin Teodorescu wrote:
>
>
> create table "note" (id serial,perioada int2,schema int2,explicatie
> text,...);
>
...
>
> contabil=> explain select * from note where perioada=15;
> NOTICE: QUERY PLAN:
> Seq Scan on note (cost=1099.99 rows=1600 width=87)
You may try :
explain select * from note where perioada=15::int2;
i think that the default for 'untyped' numbers is int4 and
this currently confuses the optimiser.
------------------
Hannu