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.