db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Bargnesi" <abargn...@selventa.com>
Subject RE: Explanation of "Compile Time" metric in Runtime Statistics
Date Fri, 25 Feb 2011 02:54:10 GMT
Oh, I didn't realize I had to clear the statistics variables.  If I issued:

CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(0)
CALL SYSCS_UTIL.SYSCS_SET_STATISTICS_TIMING(0)
CALL SYSCS_UTIL.SYSCS_SET_RUNTIMESTATISTICS(1)
CALL SYSCS_UTIL.SYSCS_SET_STATISTICS_TIMING(1)

after each

VALUES SYSCS_UTIL.SYSCS_GET_RUNTIMESTATISTICS()

call the statistics reported correctly.  The "Compile Time" reports as:

QUERY 1
Parse Time: 0
Bind Time: 0
Optimize Time: 0
Generate Time: 0
Compile Time: 0
Execute Time: 2
Begin Compilation Timestamp : null
End Compilation Timestamp : null
Begin Execution Timestamp : 2011-02-24 21:50:56.943
End Execution Timestamp : 2011-02-24 21:50:56.945

QUERY 2
Parse Time: 0
Bind Time: 0
Optimize Time: 0
Generate Time: 0
Compile Time: 0
Execute Time: 5
Begin Compilation Timestamp : null
End Compilation Timestamp : null
Begin Execution Timestamp : 2011-02-24 21:50:56.943
End Execution Timestamp : 2011-02-24 21:50:56.984

The "Compile Time" seems to always report 0.  I think that is because
the cost of compiling the prepared statement is done by the jdbc driver
once one issues connection.prepareStatement("...").

-tony


-----Original Message-----
From: Bryan Pendleton [mailto:bpendleton.derby@gmail.com]
Sent: Thu 2/24/2011 8:17 PM
To: Derby Discussion
Subject: Re: Explanation of "Compile Time" metric in Runtime Statistics
 
> The runtime statistics yields the following output for statement 1
> (first prepared statement compile) and statement 2 (same prepared
> statement executed again with different parameter):

> Begin Compilation Timestamp : 2011-02-24 13:09:50.816
> End Compilation Timestamp : 2011-02-24 13:09:50.901

> Begin Compilation Timestamp : 2011-02-24 13:09:50.816
> End Compilation Timestamp : 2011-02-24 13:09:50.901


I'm a little confused. These timestamps are also identical. Were you
somehow compiling the two statements simultaneously on two different
threads?

Or is it possible that this is actually just duplicate output, not
output from two separate statement invocations?

thanks,

bryan


Mime
View raw message