SQL Server Performance

VARCHAR(1000) better than TEXT for searching???

Discussion in 'T-SQL Performance Tuning for Developers' started by abradley81, Jul 18, 2007.

  1. abradley81 New Member

    I have a column just for search terms. People can enter their search terms and submit them. My sql then does a:

    itemSearchTerms LIKE '%' + @searchTerms + '%'


    The column should never really have over 1000 characters in it. Would it be better to use VARCHAR(1000) or TEXT for this scenario?

    Thanks
  2. Madhivanan Moderator

    use VARCHAR(1000)

    Madhivanan

    Failing to plan is Planning to fail
  3. MohammedU New Member

    Use Varchar(1000) as Madhi suggested because if you use TEXT column you may end up with some limitation...
    If your column is big in some cases then you can use TEXT with TEXT IN A ROW option...


    MohammedU.
    Microsoft SQL Server MVP
    Moderator
    SQL-Server-Performance.com

    All postings are provided “AS IS” with no warranties for accuracy.

Share This Page