-->
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: Oracle query v slow through Hibernate but quick in SQLplus
PostPosted: Mon Sep 17, 2012 10:40 am 
Newbie

Joined: Fri Sep 14, 2012 7:10 am
Posts: 1
I have a query which takes 5 minutes when run through the java app which uses hibernate. I've cut and pasted the SQL directly from hiberate trace file and run it in sqlplus/sqldeveloper and it runs instantly (0.01 seconds)(uses the index all ok and explain plan looks good.)

I don't know how to get the explain plan when it's running through the app or why it should be any different anyway as the query is identical. I'm guessing when run through hibernate it's not using the index on the second sub select.

Please can anyone help?

Am using:

hibernate-jpa-2.0-api version 1.0.0.Final
hibernate-core version 3.3.1.GA
hibernate-annotations version 3.4.0.GA
hibernate-entitymanager version 3.4.0.GA
JDBC database driver *Oracle Driver (Thin XA) for Service connections, Versions 9.0.1 and later


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.