-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: java.util.Date parameter - very strange behavior
PostPosted: Fri May 22, 2009 3:15 pm 
Newbie

Joined: Fri May 22, 2009 3:03 pm
Posts: 1
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.