Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Nils Myklebust — — source: Informix-list mailing list archive (1991-1998)
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
Your privacy choices
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.