March 14, 2013 at 7:06 am
Abu Dina (3/13/2013)
Okay great, just one more question that's been bugging me for a while.My staging table has a lot of NVRCHAR(500) columns. Now I know many of my columns will never be that big however, in terms of storage, would it make a difference if I decreased the size to say NVARCHAR(200)?
Not sure but I have a feeling that many of my queries are taking longer than expected because of the amount of IO?
Far more important than size of the Nvarchar fields is if you need the N at all!! 99.2% of the time I see Nvarchars at clients they state they will NEVER need to store 2-byte languages and thus are wasting 50% storage for every character in the Nvarchar columns!
You may well have lots of overflow pages due to the number of fat columns. Few rows per page mean more IO in general. GUIDs could mean lots of page splits and thus poor IO due to randomness and low page fullness leading to poor RAM usage. I could go on, but we are getting into the range where I start charging for assistance! 😎
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
March 14, 2013 at 7:16 am
Far more important than size of the Nvarchar fields is if you need the N at all!! 99.2% of the time I see Nvarchars at clients they state they will NEVER need to store 2-byte languages and thus are wasting 50% storage for every character in the Nvarchar columns!
I totally understand what you're saying and I wish I could do away with the NVARCHARs but we work with a lot of international data and I think that's the reason I've been instructed to use them.
You may well have lots of overflow pages due to the number of fat columns. Few rows per page mean more IO in general. GUIDs could mean lots of page splits and thus poor IO due to randomness and low page fullness leading to poor RAM usage. I could go on, but we are getting into the range where I start charging for assistance! 😎
Yes yes yes.. that's exactly what I'm thinking. In fact I was explaining this to my partner last night (poor thing she made herlsef look intersted lol!) and used A4 pieces of paper as SQL Server pages to explain how poorly designed tables could mean fewer rows per page meaning more pages so more IO.
The sad thing is I know how to fix it but I can't make these kind of decisions!
Thanks for your input.
---------------------------------------------------------
It takes a minimal capacity for rational thought to see that the corporate 'free press' is a structurally irrational and biased, and extremely violent, system of elite propaganda.
David Edwards - Media lens[/url]
Society has varying and conflicting interests; what is called objectivity is the disguise of one of these interests - that of neutrality. But neutrality is a fiction in an unneutral world. There are victims, there are executioners, and there are bystanders... and the 'objectivity' of the bystander calls for inaction while other heads fall.
Howard Zinn
March 14, 2013 at 7:26 am
Abu Dina (3/14/2013)
The sad thing is I know how to fix it but I can't make these kind of decisions!
Thanks for your input.
Bummer! Sometimes ignorance can be bliss! :hehe:
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
Viewing 3 posts - 16 through 17 (of 17 total)
You must be logged in to reply to this topic. Login to reply