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.  [ 2 posts ] 
Author Message
 Post subject: Using prepared SQL statements with SQL Server 2005
PostPosted: Tue Nov 08, 2005 12:44 pm 
Hello!

As far as I remember, SQL Server 2005 offers the usage of prepared SQL statements. As far as I remember, the SQL Server adapter for NHibernate does not offer the usage of prepared SQL statements. Is there works underway in scope of support for prepared SQL statements with SQL Server 2005 and hereby lowering the resources needed for creating execution plans over and over again?


Best regards,

Henrik Dahl


Top
  
 
 Post subject:
PostPosted: Tue Nov 08, 2005 1:28 pm 
Contributor
Contributor

Joined: Thu Jun 23, 2005 1:08 pm
Posts: 32
Location: Baltimore, MD
SQL Server has supported prepared statements for a while (at least SQL Server 2000, maybe earlier). However, they are turned off by default.

To turn it on, set hibernate.prepare_sql to true (on the configuration object, or the app.config.)

Judging by a statement by Mike Doerfler, they are turned off because there was not always a performance benefit (and sometimes a performance hit). If you find that to be different with SQL Server 2005, please let us all know.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.