Posted in 1997
staccuc@riq.qc.ca wrote: :Anyone has an idea on how to optimize this kind of statement : :select count (distinct field1) :from table1 :where field2 = 'something' : :There is indexes on both field1 and field2, but Informix Online 7.2 is :not using them according to the explain plan. : :Any idea ? What's the size of your table (number of rows). It should be smart enough to do a sequential scan of the table up to some size, and use the index on field2 therafter. Nils.Myklebust@idg.no NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company The Informix FAQ is at http://www.iiug.org
We use strictly necessary cookies to make this site work. With your consent we’d also use optional cookies for analytics and marketing. You can accept all, reject all, or choose. Read our Cookie Policy.