List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:July 27 1999 4:10am
Subject:Re: Varchar question
View as plain text  
At 1:58 AM -0500 7/27/99, David Stack wrote:
>Lets say my max record length is 30 characters in size.
>Would a varchar (30) column be as efficient as a varchar(255) column in
>this situation?
>I am pretty sure that MySQL just stores the offset by using 1 byte, so it
>should use the same amount of space reguardless of it being a varchar(30)
>or a varchar(255) (this doesn't count the extra bytes that is used for the
>actual storing of the data of coarse)
>Is there any disadvantage to using the varchar(255) column in the above

None that I can see.  About the only difference is that if you store
a 31-character string into a VARCHAR(30) column, the last character will
be chopped of.  With VARCHAR(255), it won't be.

Paul DuBois, paul@stripped
Varchar questionDavid Stack27 Jul
  • Re: Varchar questionPaul DuBois27 Jul
    • Re: Varchar questionThimble Smith27 Jul
      • Re: Varchar questionPaul DuBois27 Jul
Re: Varchar questionDavid Kaufman27 Jul