Showing posts with label max. Show all posts
Showing posts with label max. Show all posts

Wednesday, March 28, 2012

Performance Related Question

I am doing a performance counter for the CPU usage and
recording the output to a log file.
What i want to know is a way where I can say that the max
CPU usage say 80% occured for x amount of time, the
perfmon does not tell me how long was the maximum time
was for.
so i want something like CPU usage max value 80% was for
9 seconds.
Any ideasapok
In the Performance Monitor you can set up a range of intervals , i mean from
9am to 11am and see how CPU behaved since.
Also, If I rememeber well there are some classes in .NET framework you can
use to get the info from PM.
"apok" <anonymous@.discussions.microsoft.com> wrote in message
news:15aa01c535b7$e327f0a0$a501280a@.phx.gbl...
> I am doing a performance counter for the CPU usage and
> recording the output to a log file.
> What i want to know is a way where I can say that the max
> CPU usage say 80% occured for x amount of time, the
> perfmon does not tell me how long was the maximum time
> was for.
> so i want something like CPU usage max value 80% was for
> 9 seconds.
> Any ideas

Wednesday, March 7, 2012

Performance of nvarchar(max)...


Hi-

I've noticed that I have gotten in the habit of using nvarchar(max) as the datatype for almost all of my string-type arguments when defining stored procedures. I'm curious if anybody has any thoughts on if this is a good or a bad practice?

So, is it better to say "create procedure foo(@.bar nvarchar(50) ..." or "create procedure foo(@.bar nvarchar(max) ..."?

Thanks,
-Eric.

It is recommended that you should use nvarchar(max) instead of nvarchar(n) when the size of column data might exceed 8000 bytes.

There is no difference in the behavior of varchar(n) and varchar(max). As a good practice, varchar(max) should be used as a substitute for text datatype and not of varchar(n).