SQL Server Performance

Text versus varchar and speed & size

Discussion in 'T-SQL Performance Tuning for Developers' started by sql777, Jan 7, 2003.

  1. sql777 New Member

    I have a field in a table that would be 'best' suited with a text field since the data can be extremely large.
    Would table size, reads, writes be faster if the column was a varchar of 3000? (so I can have more data read per sweep etc)?

    I remember that large data in the text column type will be stored in a separate section internally..will this affect speed?

    So basically how does the text type effect table size compared to a varchar of 2000-4000? reads?writes?updates?deletes?

  2. bradmcgehee New Member

    Text columns are slower than varchar columns, and they are also more difficult to manipulate. I highly recommend using varchar columns for best overall speed. If you exceed the approx 8,000 character size of a row, you can store your data in muliple rows. More often than not, this is still faster than using Text columns. Also, Text columns can't have standard indexes, although the SQL Server Search Service and third party tools can do this for you.

    Brad M. McGehee

Share This Page