arthurblake / log4jdbc

log4jdbc is a Java JDBC driver that can log SQL and/or JDBC calls (and optionally SQL timing information) for other JDBC drivers using the Simple Logging Facade For Java (SLF4J) logging system.
506 stars 148 forks source link

Executed in 0 msec #77

Closed cleankod closed 8 years ago

cleankod commented 8 years ago

How come the sql timing sometimes shows that the statement has been executed in 0 msec? I have statement caching of the JDBC driver (both Log4jdbc and Oracle's) turned off. I am using Oracle's official JDBC driver.

arthurblake commented 8 years ago

This is completely normal. It just means that this particular SQL is running really quickly. The tick resolution of the timing method we use (System.currentTimeMillis) can be inaccurate up to 10 msec or more, depending on your platform, so if your SQL is running faster then that, then 0 can be reported.