?
Solved

SQL Server Varchar MAX or Not?

Posted on 2009-12-28
7
Medium Priority
?
345 Views
Last Modified: 2013-11-08
I'm building a SQL Server table which will store a description field, complete with HTML markup.  This field can extend beyond 8000 characters so I was considering using the  VARCHAR(MAX) data type.  I run a very high traffic site and am concerned with performance.  Is it more efficient to combine the values (C# StringBuilder...) from two separate tables which contain VARCHAR(7500)?  
0
Comment
Question by:Phil5780
7 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 2000 total points
ID: 26134515
you can go ahead with varchar(max)
0
 
LVL 26

Expert Comment

by:tigin44
ID: 26134520
you can use the varchar(max) without hesitating. Access time of the varchar(8000) and varchar(max) same. SQL server will not support text, ntext data types and microsoft recommends the use of varchar(max) instead of them. or the filestream datatype...
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 26134527
string operations take lot of resources
0
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 

Author Comment

by:Phil5780
ID: 26134547
So you think VARCHAR(MAX) outperforms StringBuilding (.NET) two VARCHAR(7500)?
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 26134556
yes, it willl
0
 
LVL 26

Expert Comment

by:tigin44
ID: 26134562
sure that is
0
 
LVL 36

Expert Comment

by:Miguel Oz
ID: 26134580
I think you have to go for two tables, the limit of VARCHAR(MAX) is 8000 bytes.
http://stackoverflow.com/questions/1761124/how-many-characters-in-varcharmax
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question