Re: about compression
Posted in 1999
Yan You need the VARCHAR data type instead of CHAR. However the limit on the size of a VARCHAR is 255, so you will come up 45 short. CHAR automatically pads shorter strings to the size specified in CHAR(?) in your DDL. If you can, try to split up your CHAR(300) field into 2 VARCHAR(150,1) fields or some other combination. VARCHAR(150,1) means that at least 1 character will be stored, and you can store upto a maximum of 150 chars. HTH Sujit Yan Zhu <yan.zhu@infinity-insurance.com> on 04/24/99 07:43:01 AM To: "informix-list@iiug.org" <informix-list@iiug.org> cc: (bcc: Sujit Pal) Subject: about compression hi all: I have a field in a table which needs to be 300 long. However, only 5% of all records (half a million of them) has this field filled with actual text. My question is, does informix automatically compress the empty space or do I have to do something to make it compress the wasted space? I don't want to use 300 chars for each field while I don't use most of them. thanks yan