Click here to Skip to main content
15,904,297 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
What would be the impact if i design a database table with 10 columns all varchar(1000) but not all columns will have values?

This table will serve as my audittable for several tables.
Posted
Comments
Sergey Alexandrovich Kryukov 18-Jan-13 1:32am    
Well, what would be the alternative?
—SA

Please see my comment to the question. It depends what you want to compare this decision with. Anyway, I cannot imagine more efficient solution than when you actually using those null values. You hardly can go wrong with them.

—SA
 
Share this answer
 
v2
Comments
Jephunneh Malazarte 18-Jan-13 4:20am    
thanks SA I thought that when using varchar and assigned null value the actual size declared in the column will still be utilized. I am quite confuse at that time because the deadline of the project is drawing near.. with your comment and the comment from the other guys it give me confidence.. thanks again...
Sergey Alexandrovich Kryukov 18-Jan-13 12:46pm    
You are very welcome.
Good luck, call again.
—SA
there is no performance issue in using VARCHAR. the space utilized is only for the length of the data stored in the column and not whole 1000.

you can also read other performance tips here[^]
 
Share this answer
 
Comments
Jephunneh Malazarte 18-Jan-13 4:18am    
thanks... i am also able to get the actual comparison between char and varchar.. thanks jibesh..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900