View Single Post

   
  #2 (permalink)  
Old 02-27-2008, 04:13 AM
Ian
 
Posts: n/a
Default Re: Question about VARCHAR Vs. CHAR fields

jdokos wrote:
> Hello,
>
> I have a question about VARCHAR fields. Our application groups here
> are starting to use VARCHARs much more frequently. Even VARCHAR (2) to
> (9) length fields. They say this is because some of the application
> programs, specifically Java Beans cannot handle the spaces after the
> value in CHAR fields.
>
> Is anyone else seeing this trend?
>
> I know that VARCHAR fields have 2 extra bytes of overhead. Does anyone
> know if there is a significant performance impact in DML against these
> fields due to tracking the length?


There is the additional storage overhead as you mention, plus this can
lead to performance issues with row overflows and/or page reorgs.

IMO, this is usually a symptom of lazy programmers rather than "the
app can't handle extra spaces".

Reply With Quote