Thread: Using index

Using index

From
Ice Planet
Date:
Hello

I have one problem with indexes. I have serched the mailing lists and found there a lot of info about indexes, but not
theanswer. 

I done following:

create table t1 (a1 int8 not null , a2 int8 not null, a3 char (128), primary key (a1,a2));
OK
create index i1 on t1 (a1);
OK

Then i inserted about 5000 rows into into this table

Then i use EXPLAIN  SELECT a1 FROM t1 WHERE a1 = 444
and the explain told me sequential scan...

I don't know where is the problem. I think that the optimizer should use index ???
(I done vacuum and nothing changed)

Thanks for help

                       Best regards
                                              Ice Planet

e-mail: ice@adiemus.sk
ICQ#: 67765483