dbTalk Databases Forums  

table columns

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss table columns in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
MikeJ
 
Posts: n/a

Default table columns - 10-15-2007 , 01:22 PM






i have a table with 6 million row
what is the affect of increasing a varchar(255) column
to varchar(500)

tia
MJ



Reply With Quote
  #2  
Old   
Gert-Jan Strik
 
Posts: n/a

Default Re: table columns - 10-15-2007 , 03:53 PM






If you change this using the ALTER TABLE ... ALTER COLUMN command, then
you will see no immediate effect, apart from the fact that you can now
store larger strings. Make sure you don't (accidentally) change the
NULL/NOT-NULL setting. The ALTER statement will need a schema lock, but
probably just for a fraction of a second (assuming no blocking).

If you actually start replacing shorter strings with longer strings, you
could get more page splits and thus fragmentation.

--
Gert-Jan


MikeJ wrote:
Quote:
i have a table with 6 million row
what is the affect of increasing a varchar(255) column
to varchar(500)

tia
MJ

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.