Re: no index used
Posted in 2000
UPDATE STATISTICS?
From: steinhoefel@dcs-systeme.de
>
>CREATE INDEX projKeyIndex on table1 ( projKey ASC);
>CREATE INDEX kmiIndex on table1 ( kmi ASC);
>CREATE INDEX mtiIndex on table1 ( kmi ASC, mti);
>CREATE INDEX mmmIndex on table1 (mti);
>CREATE INDEX cmiIndex on table1 ( kmi ASC, mti, cmi);
>CREATE INDEX ktiIndex on table1 ( kti ASC);>
>I tried the following selects:
>select kmi from table1 where kmi = 5 -> table scan
>select mti from table1 where mti = 5 -> table scan
>select * from table1 where kmi=5 and mti=5 ->index mtiIndex used>
>The result set of the first and third select is 0 rows, of the middle one
>100
>rows.
>There are 12 distinct values in the column kmi (that means 20.000 rows have
>the same kmi) and
>2500 distinct values in mti (100 rows per mti)
>In my opinion the answer to the first and third statement should be there
>in
>no time, just look into the index, nothing there with that value - zero
>rows
>answer.
>
>I'm still interested in how to specify a query plan manually in informix.
You can't, but you can issue "directives" to the compiler. It's in the
manual.
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com