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: sqlserver2005;hbm2dll doesn't create indexes on foreign keys
PostPosted: Tue Jul 17, 2007 11:28 am 
Newbie

Joined: Mon Apr 16, 2007 10:24 am
Posts: 5
Hi all,

I've got a question about mappingfiles and hbm2dll. I noticed that the Dialect for ms sqlserver 2005 will not automatically create an index on a foreignkey. And there is no way (that I know of) to specify this in the mapping file. No indexes on foreign keys does hurt performance a lot in our application.
Is there a way to specify an index on foreign keys (in many-to-one's) in the mappingfile? Or should I create an additional sql script to create the necessary indexes?

http://www.sql-server-performance.com/sql_server_performance_audit7.asp:
Quote:
Many people, when creating primary key/foreign key relationships (which are often used in JOINs) forget that while an index is automatically created on the primary key column(s) when it is established, an index for a foreign key is not automatically created, and must be created manually if there is to be one.


I'm using a version of NHibernate from svn a month before the 1.2.0 GA was released.

Thanx.


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.