Re: VARCHAR query
Posted in 1997
Tom wrote: > I am setting up a table to receive data from a PBX device. I have been > told that the data can be up to 255 chars. However, in browsing some of > it, I see that rarely is it over 80. There are a lot of records - we > need to keep 30 days on line with about 300000 records per month. > Updates will not be required and the field is not indexed. > > I was wondering if a VARCHAR field would be a good idea here. I dont > know what the overhead is (ie, what my actual savings would be). > This sounds like the perfect candiate for VARCHAR to me. If you will ever UPDATE the column (rather than on INSERT), Determine the 'average' size of the string and define the column as VARCHAR(av,255) so that most UPDATEs won't require moving/dividing the column. (When you define a VARCHAR(min,max), the min size is always allocated, even if the number of characters in the column is less than that number) //////////////// ======================================================= ////////// // Dennis J. Pimple Informix Software, Inc. ////// / /// Principal Consultant 5299 DTC Blvd Suite 740 ///// // //// dennisp@informix.com Englewood CO 80111 //// // ///// /// // ////// recept: 303-850-0210 // // /////// direct: 303-740-5611 Opinions expressed are mine, / /////////// fax: 303-843-6408 and do not necessarily //////////////// http://www.informix.com reflect those of my employer