I know ;)

"The ideal situation is alongside the fix you set parameter sizes in
your mapping that match your table..."

Naz

On Oct 30, 12:58 pm, zvolkov <[email protected]> wrote:
> Naz, once the fix is in place, you can do it in the mappings by adding
> type="AnsiString(LENGTH)" to each string property.
>
> On Oct 30, 5:08 am, Naz <[email protected]> wrote:
>
> > Hi
> > Although passing large default parameter sizes is still not a good
> > idea with MS SQL since the database potentially might start holding
> > large nvarchar(4000) parameters in memory. SQL Server is fairly smart
> > and will just make sure it has the memory available to hold it but
> > only use the memory required and not allocate the full amount.
>
> > This is still a lot better situation than not re-using execution plans
> > and/or filling up your server full of them to the point it starts
> > dropping plans so although the fix isn't perfect it's so much better
> > than the current behaviour.
>
> > The ideal situation is alongside the fix you set parameter sizes in
> > your mapping that match your table or if your to lazy to do that then
> > at least if you know most of your nvarchar fields are say 255 length
> > make that a default convention and only specify larger if required.
>
> > Regards,
>
> > Naz
>
> > On Oct 29, 1:55 pm, zvolkov <[email protected]> wrote:
>
> > > Ok, implemented these changes in the next version of my app, goes to
> > > PROD around New Year.
>
> > > On Oct 29, 12:09 am, Fabio Maulo <[email protected]> wrote:
>
> > > > 2009/10/29 zvolkov <[email protected]>
>
> > > > > Fabio, my point is: if SQLServer is changed to always call
> > > > > SetParameterSizes and SetParameter does not specify the size, NH will
> > > > > simply default to nvarchar(4000), so what's the problem?
>
> > > > Try it with a app in prod. never set parameter size in your queries and
> > > > pray.
> > > > If all is working as you expect and your DBA is happy let me know 
> > > > (opening a
> > > > JIRA with needed info).
>
> > > > --
> > > > Fabio Maulo
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to