Re: Indexing problem
Posted in 1998
Muppala, Sharath (Sharath)** CTR ** wrote: > > > I have a table in Informix Online Dynamic Server 7.2 with 6 columns and > > 10,000 rows. I created a composite unique index on two columns ( one is > > serial with not null and the other integer with not null) and dupls index > > on integer column. In a select query Iam comparing serial column with > > program variable value and joining with other table using integer column > > in the where clause. Query retreival time is 75 seconds . Then I created > > an index on serial column . Query retreival time is 2 seconds. My question > > is why it is faster in the second case and why can't the composite index > > is enough. Did you run both cases with SET EXPLAIN ON;? This will tell you the difference in the query path that the engine took in each case and will probably answer the question for you. Art S. Kagel