RE: utility to time queries
Posted in 2000
Try getting Informix I-spy????
-----Original Message-----
From: Jonathan Leffler [mailto:jleffler@earthlink.net]
Sent: Wednesday, April 19, 2000 2:27 AM
To: informix-list@iiug.org
Subject: Re: utility to time queries
"Mark D. Stock" wrote:
> Paul Watson wrote:
> > >From: Carlson@WHSmith [mailto:carlson1@bellsouth.net]
> > >Greg Starnes wrote:
> > >> Does Informix have a SET TIMING ON function? SET TIMIMG ON is the
Oracle
> > >> function.
> > >> I'm trying to tune a bunch of queries, and would like the db to time
the
> how
> > >> long the query takes .
> > >
> > >Are you in a UNIX environment? I always use 'timex', as in
> > > timex dbaccess <dbase_name> <SQL file>
> >
> > Depending on the OS and command line you are using you should use time
(the
> > shell builtin) 'cos it can more accurately track across process
boundaries
>
> I think you'll find that on most modern Unices, timex is a link to time.
> ;-)
The trouble with time or timex is that it measures the time it
takes to execute the whole program, database connection, output
formatting and all, whereas you may want to time sub-sections,
or each separate query in a set of 6 that build the overall answer
with a bunch of temp tables, or whatever. For that, you need
support in the tool -- SQLCMD provides that. Check out the
benchmark mode (-B).
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v1.00.PC1 -- see http://www.perl.com/CPAN
#include <disclaimer.h>