Re: accept ... from time
- From: "Robert Jones" <rjones0@xxxxxxxxxxx>
- Date: 23 Jan 2007 12:33:00 -0800
Bottom posting
michael.bierenfeld@xxxxxx wrote:
Hello,
I want to measure the execution time of a sql statement. Can I get the
time in milliseconds to be displayed.
I have
accept START-TIME from time
EXEC SQL SELECT ... something
accept END-TIME from time
DISPLAY "EXECUTION lasted from" START-TIME
DISPLAY " till " END-TIME
START-TIME and END-TIME is pic x(8) this is hh24:mm:ss. But I need
fractions of seconds. How can I do this. Target System is Microfocus
and AIX.
Kind Regards
Michael
As well as the other approaches, you could consider using
EXEC SQL SET :time-variable = CURRENT TIME END-EXEC or similar
As there may be an overhead invoking the DB2 processor, you could run
two such statements in sequence to see what the latent delay is and as
someone else suggested, it would be a good idea to check the
granuarity, perhaps by executing several in sequence, to get an idea of
the "accuracy" (if that's quite the right term) available.
.
- Follow-Ups:
- Re: accept ... from time
- From: Michael Mattias
- Re: accept ... from time
- References:
- accept ... from time
- From: michael.bierenfeld@xxxxxx
- accept ... from time
- Prev by Date: Re: Reading in file containing Low Values doesn't work correctly
- Next by Date: Re: Reading in file containing Low Values doesn't work correctly
- Previous by thread: Re: accept ... from time
- Next by thread: Re: accept ... from time
- Index(es):
Relevant Pages
|