query optimization
Posted in 1992
jmn@pdx.csd.mot.com (Jim Nielsen) write :
>Can anyone tell me where I might find some definitive information on
>how to optimize wildcard searches.
>
>I have a table which contains 300,000 records and I need to look up
>records based on 6 possible fields. Some of the fields can be wildcarded.
>In my experimentation, I have found some interesting but inexplicable timing
>patterns. My documentation is of no assistance.
>
>Any help would be appreciated.
1) To get a feel for the relative cost of a query for comparison
purposes execute the query after executing the following sql statement:
set explain on;
This will give you a relative cost for the query; it will also give the
indexes and search paths used. MAKE SURE YOU RUN update statistics;
FIRST. The information from explain will be written to a file in the
current directory.
2) I recommend the class given by informix - "Optimizing Informix Applications"
Warren J. Saccente
Bell Communications Research
Piscataway, NJ