Re: Question about VARCHAR Vs. CHAR fields
Posted in 2005
rkusenet wrote: > "DA Morgan" <damorgan@psoug.org> wrote > >> Is it true that in Informix VARCHAR takes more space than CHAR? > > > Not at all. Just one byte extra at the beginning to record the length. > >> In Oracle the waste of space and CPU comes with working with CHAR and >> it has been almost completely abandoned. > > > same is true with informix, except that upto a length of char(15) (some > say even 20) > the performance gain in char is worth the space wasted. so I would > always recommend > a char field upto char(15). > The difference between char and varchar becomes stark in delete-and-load > tables. > That is tables which are periodically cleaned and loaded again. A table > with fixed-length > columns (char, int, date etc) loads much faster than with variable > length table. I think > it is something to do with the engine calculating before inserting on > which page the > row will fit. Thanks. I will update my information on Informix accordingly. Daniel Morgan -- Daniel A. Morgan http://www.psoug.org damorgan@x.washington.edu (replace x with u to respond)