Re: Size of varchar
Posted in 1998
The Wilcoxons wrote: > Tom Grenier wrote in message <361AA3C7.9D87A721@biztravel.com>... > >If I have a varchar that the developers are not sure how large it > >will be -- they guess 50-100 chars but may grow later -- and is > >not going to be indexed -- is there any reason *not* to create it > >as a varchar(255)? From all I can read there is no more overhead > >or space taken with avarchar(255) where all data are less then 100 > >chars than defining it as a varchar(100). > > A larger varchar will use more memory internally and in applications. > There may be some extra overhead on the CPU during some applications. In the database, there is no direct disk space or processing cost associated with the larger size, though IIRC there is some limitation on the amount of free space needed on a page before a row can be added. In your I4GL application, the million-row array of VARCHAR(255) will be about 5 times the size of a million-row array of VARCHAR(50). Does that matter? -- Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net) Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN #include <disclaimer.h>