-->
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.  [ 3 posts ] 
Author Message
 Post subject: Foreign Key Constraints
PostPosted: Mon Nov 14, 2005 12:02 pm 
Beginner
Beginner

Joined: Tue Dec 21, 2004 3:18 am
Posts: 32
Hi,
I would like to know, if I removed all foreign key constraints from the database,
will that affect hibernate performance in any way.

Does hibernate depend on foreign key constraints in anything (for example in cascading updates or deletes) or does it use the model objects only?

Thanks in Advance.


Top
 Profile  
 
 Post subject: Re: Foreign Key Constraints
PostPosted: Mon Nov 14, 2005 1:25 pm 
Expert
Expert

Joined: Fri Jul 22, 2005 2:42 pm
Posts: 670
Location: Seattle, WA
sherihan wrote:
Does hibernate depend on foreign key constraints in anything (for example in cascading updates or deletes) or does it use the model objects only?


H relies on Object Mappings.

sherihan wrote:
I would like to know, if I removed all foreign key constraints from the database,
will that affect hibernate performance in any way.


It will potentially worsen read performance and improve "insert/update" performance.

IMO: removing all the constraints from DB is a very bad idea.

_________________
--------------
Konstantin

SourceLabs - dependable OpenSource systems


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 14, 2005 2:33 pm 
Expert
Expert

Joined: Sat Jun 12, 2004 4:49 pm
Posts: 915
foreign key don't create index (for oracle, i don't sure for another database) and deleting foreign key don't touch performance except that preformance insert/update is better (no checking)

if you create index for foreign key and delete it (index don't depend from foreign key) then you will have worst select performance


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

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.