SQL Server Performance

optimal sizes of varchar fields

Discussion in 'Non-Transact SQL Developer Performance Tuning' started by __coder, Apr 18, 2005.

  1. __coder New Member

    I've heard that it is best to keep the lengths of varchar fields at numbers that are a power of 2 (64,128,256 etc). Is this true? Does this help performance in any way?
  2. FrankKalis Moderator

    Read this recent thread:<br /<a target="_blank" href=http://groups.google.de/groups?hl=de&lr=&frame=right&th=ec4b1a2ba92854d5&seekm=uRtAEwXMFHA.1476%40TK2MSFTNGP09.phx.gbl#link1>http://groups.google.de/groups?hl=de&lr=&frame=right&th=ec4b1a2ba92854d5&seekm=uRtAEwXMFHA.1476%40TK2MSFTNGP09.phx.gbl#link1</a><br /><br />Should give some interesting insight. [<img src='/community/emoticons/emotion-1.gif' alt=':)' />]<br /><br />--<br />Frank Kalis<br />SQL Server MVP<br /<a target="_blank" href=http://www.insidesql.de>http://www.insidesql.de</a><br />
  3. rockmoose New Member

    The link seems broken... <img src='/community/emoticons/emotion-6.gif' alt=':(' />
  4. FrankKalis Moderator

  5. rockmoose New Member

    That was quick [<img src='/community/emoticons/emotion-1.gif' alt=':)' />]<br />Works now.
  6. FrankKalis Moderator

    Good, but you must scroll down a bit. I'm learning how to use snipurl right now [<img src='/community/emoticons/emotion-6.gif' alt=':(' />]<br /><br />--<br />Frank Kalis<br />SQL Server MVP<br /<a target="_blank" href=http://www.insidesql.de>http://www.insidesql.de</a><br />
  7. rockmoose New Member

    Yes I did read most of it.<br /><br />It might theoretically make a difference for the Query Optimizer as I understood.<br />But then again this should not be a concern.<br />It seldom makes sense to scan through large varchar columns anyway.<br /><br />Yeah, the 2nd url looked much nicer <img src='/community/emoticons/emotion-1.gif' alt=':)' />

Share This Page