When designing a data warehouse in SQL Server what is the best setting for the varchar data type?

Tags:
SQL Server data warehousing/business intelligence
I am designing a data warehouse database to be implemented in SQL Server. There are a number of variable length character fields for which I intend to use the varchar field type. On previous data warehouse implementations in Oracle, I frequently set the length for the varchar fields higher than the current data length. I did this so that if the source changes to a longer field in the future, it will not be necessary to update the database. Is there any reason not to do this for a SQL Server database? One example would be, if the actual data field is now up to 10 characters, but I want to make the field type varchar (25) in case the source changes to a larger field in the future. Will this have any negative performance implications?
ASKED: April 8, 2008  11:14 PM
UPDATED: April 9, 2008  12:18 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

There shouldn’t be any negative performance issues as long as you don’t go nuts. Just make sure that you don’t go over your max record length of 8060 bytes.

If you set all the columns to 1000 characters you could end up with some problems. Are these your DIMs for FACTs? How many rows are we talking about here?

I’ve never found that a slightly larger field is a problem.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following