-->
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: Peformance with hibernate query causing problem
PostPosted: Thu Oct 01, 2015 7:17 am 
Newbie

Joined: Fri Mar 27, 2015 3:04 am
Posts: 3
HI,

I have an entity that has many to one relationship with other entities and that then having relationship hierarchy inside them.

So While running the query containing that entity ,it is going to fetch all nested entities and taking too much time.
While executing query in database it is few miliseconds.
But with Hibernate (When record numbers is 1000 or more ) it is taking at least 15 minute to just fetch data from database.
The query is a simple sql query.

SELECT * FROM customerOfferPurchase WHERE dateCancelled >= :firstDay AND dateCancelled <= :endDay AND customerId NOT IN( SELECT customerId FROM customerOfferPurchase WHERE customerOfferPurchaseStatus =2 ) ORDER BY id DESC";


simply to fetch data on the basis of two dates.

Please any body tell me how to kill this delay.

Thanks in advance.


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.