August 4, 2010 at 3:26 am
Hi,
We are re-structuring our database for various reasons. We have generated the new tables to replace the old ones and have back-populated the data (approx 250m records).
There are a number of fields that are indexed as they are used for searching. I have noticed however, that the fields with no data have been populated with empty strings, rather than NULLs. Is this going to hamper performance? From experience, NULL columns are faster, I would assume because they are ignored by the index?
If anyone can confirm either way, that'd be great.
Thanks
August 4, 2010 at 9:10 pm
Try this blog post, http://blogs.msdn.com/b/sqlserverstorageengine/archive/2006/06/29/650349.aspx
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 5, 2010 at 2:41 pm
You are correct, most rdbms ignore null values when indexing.
Having said that, there is a huge conceptual difference in between an empty string and a null value. An empty string tells there is nothing there - which believe it or not it is a value 🙂 while a null value tells that the value is currently unknown.
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply