Re: Optimizing queries info
Posted in 1993
Greg Sheppard (imop%uspfo.wa-ngnet.army.mil@wa-ngnet.army.mil) wrote:
: We've recently written a couple of reports which take FOREVER (hours)
: to run...and are getting very interested in streamlineing our queries
: for speed and efficiency. Is there a book or useful info on how best
: to get the quickest results with queries using iSQL? Or is it just a
: matter, as we suspect here, of slugging our way through it, trying
: this and trying that until we get what we're after?
: Any help and/or pointers in the direction of some useful info would
: be muchly appreciated.
Greg,
Use set explain on; as the first line of your query and run it. Take a look
at the sqexplain.out file that's generated. If you can't figure out what
it's trying to tell you, check the manuals and really pore over it. Of
course, you could post your query and sqexplain.out to the net and let some of
us look at it, but you'd be cheating yourself.
Set explain on is absolutely the best tuning tool you have in Informix. Ifyou have any interest at all in improving your database performance, learning
to use this tool to find out how the optimizer works is the most essential
first step.
Joe
--
: Greg Sheppard Comm: (206) 581-8871 -=*> Stuff Occurs <*=-
: --
--
===========================================================================
jlumbley@netcom.com (Joe Lumbley) "If you believe that my statements
Database Administrator represent my company, please send
The Tigon Corporation money and I'll send you stock"
Dallas, Texas
===========================================================================