RE: Time measurements
Posted in 1998
---------- From: Billy Wheeler[SMTP:billy@west.co.za] Sent: Wednesday, January 28, 1998 4:59 AM To: Georg Winkens; informix-list@rmy.emory.edu Subject: Re: Time measurements >On 28 Jan 98 at 10:03, Georg Winkens wrote: >> Does anybody have experience in doing time measurements for SQL >> queries that take less than 1 sec.? >> >> I have a SQL script with a sequence of select statements and I would >> like to know the elapsed time for each of the statements. I tried to >> use _Select CURRENT ..? before and after each statement, but it >> seems that it does not give any figures for the milli seconds >> fraction. > >You must ensure that USEOSTIME is switched on in your onconfig file. > >> Another question: Where do I get information about the CPU time that >> Informix used for one specific session? _onstat_ provides me only >> with the total CPU time used by all processes. > >Try running your sql scripts using timex. Or, if you've got ESQL/C available, find SQLCMD in the IIUG archives (http://www.iiug.org). It has a 'benchmark' option (-B) which times each command for you using the maximum available precision from your system's timing system calls. Typically, the resolution is in microseconds; on a few machines, you may be forced to suffer with just milliseconds; and some machines provide nanosecond resolution (which is different from nanosecond accuracy). SQLCMD has other timing mechanisms in it too. See the documentation. Yours, Jonathan Leffler (jleffler@visa.com) #include <bother.ms-exchange.h>