I have a SQLQuery with a parameter like this "... where start_date >= ?", where start_date is Oracle DATE. I was binding a java.util.Date value with setTime() method, everything worked fine, then the application was used with the different database and the query became like 1000 times slower.
I enabled logging and here is what I saw:
preparing statement binding '09:59:00' to parameter: ...
Note that there is no indication that the date part was bound, but judging by query results it was. I mean the query returns correct results with the date component of the parameter being used.
When I changed the code to use setTimestamp() the performance with the second database came back to normal.
I just want to understand, what's going on here.
Hibernate version 3.2.5
|