-->
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: nvarchar with SQL server
PostPosted: Wed Dec 20, 2017 6:45 am 
Newbie

Joined: Wed Dec 20, 2017 6:38 am
Posts: 1
We recently observed performance issues after migrating varchar fields in DB to nvarchar. Prepared statements generated actually reserves 4000 instead of length of column. This is causing heaving memory usage in server side. How can we optimize hibernate not to use max length for nvarchar fields?

eg: exec sp_prepexec @p1 output,N'@P0 nvarchar(4000),@P1 nvarchar(4000),@P2 nvarchar(4000),@P3 nvarchar(4000),@P4 nvarchar(4000),@P5 nvarchar(4000),@P6 nvarchar(4000),@P7 nvarchar(4000),@P8 nvarchar(4000)',N'select ********


Top
 Profile  
 
 Post subject: Re: nvarchar with SQL server
PostPosted: Wed Dec 20, 2017 8:40 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1638
Location: Romania
Quote:
How can we optimize hibernate not to use max length for nvarchar fields?


Why do you think that's due to Hibernate? It looks more like an SQL Server JDBC driver issue. Try to investigate it thoroughly.

_________________
If you liked my answer, you are going to love my High-Performance Java Persistence book and my blog as well.


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.