Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

start time for a CallableStatement  RSS feed

 
Grace Green
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


How could I get the time at which the CallableStatement starts executing ?



The only option I know of is to make another db call to get the sysdate (select sysdate from dual) right before executing the CallableStatement.
ANy other good option ? Thanks
 
Jan Cumps
Bartender
Posts: 2628
17
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You could use java.util.Date, or System.currentTimeMillis(), or System.nanoTime()
 
Madhan Sundararajan Devaki
Ranch Hand
Posts: 312
Java MS IE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe, you can store the start time and end time within the callable entity and return it.
 
Sudheer Bhat
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why not log the time in the callable stored function/procedure? Put this as the first executable statement in the callable routine.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!