Using CHAR /LVARCHAR datatype in Informix
Posted in 2003
Topics: Stored Procedures & SPL, Data Types & Schema Design, Platform-Specific Issues
Hi All, We are using informix 9.21 on solaris. In a table we have a column of type lvarchar which is called defaultvalue, as it can store 2048 chars, the client has supplied the data which is more than 2048 chars. We need to find an alternative datatype to store more than 2048. Is it better to use 2 or 3 columns for the the same value as 1.defaultval1 lvarchar, defaultval2 lvarchar .... or 2. to use CHAR (3000) or more 3. Split the column into more than 1 col as VARCAHR(255) (In this case what happens to the existing data?) Can anybody suggest me which is more feasible to use in this type of requirement, if we use CHAR /LVARCHAR will it slow down the search and select's ? As we have to fix this pblm for the client. Any suggestions highly appreciated. Thanks in Advance Kalpana Pai
KalpanaPai wrote: > We are using informix 9.21 on solaris. > > In a table we have a column of type lvarchar which is called > defaultvalue, as it can store 2048 chars, the client has supplied the > data which is more than 2048 chars. > > We need to find an alternative datatype to store more than 2048. >[...] > As we have to fix this pblm for the client. Any suggestions highly > appreciated. Upgrade to IDS 9.40 and use LVARCHAR up to 32 KB (minus a bit). Plus it will be supported for a good bit longer than 9.21 will. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/
"Jonathan Leffler" <jleffler@earthlink.net> wrote > Upgrade to IDS 9.40 and use LVARCHAR up to 32 KB (minus a bit). 32KB!!! cool. 32KB should statisfy almost all free text requirement for which in versions earlier than 9.4 we have no option other than a TEXT field. Can anyone elucidate the pros and cons of using LVARCHAR to store a big char field as oppose to a TEXT field. I am paritcularly interested in knowing how INFORMIX stores a LVARCHAR field. thanks. -- email id is bogus