OnLine Optimizer with compound indices??
Posted in 1995
I have a table with a compound index on two fields (we have many
examples such as this, often with more fields, but let's use this
example for the sake of discussion). For example, I have fields a & b.
Now, I want to do a select such as:
select a,b from my_table where a || b > "XXXX"
(The value "XXXX" spans both column a and b).
This causes the optimizer to apply a filter as it reads *ALL* index
values (at least that seems to be the case, based on the long "think"
time before the first record is returned). However, if I were to just
say '... where a > "XX"', or something similar, Informix would quickly
jump to the correct value. Since the index is on (a,b), I don't see
why my example can't work the same way.
If you've had any experience with similar queries (using concatenated
values), I'd appreciate any input you might have.
Thanks...
--
-------------------------------------------------------------------------------
Todd Saylor | Bi-Tech Software, Inc.
"No matter where you go, there you are" | (916) 891-5281
----------- Opinions expressed are subject to change without notice -----------