Re: CHAR vs. TEXT Question
Posted in 1998
Developer wrote: > > Can anyone advise as to which is more preferable in terms of all around > flexiblity/performance between using a text or char(x) datatype? I already > know text is stored in a separate dataspace and is limited when using SQL. > Is there a reason why I shouldn't use a char over a text datatype assuming I > wouldn't have to store more than 32K worth of data for a particular record? well, in 5.x: 1) if you will use text type: - you can store it in - tablespace - and you can do on-line archiving - blobspace - and you can not do on-line archiving - you can not search in text columns - you will not waste db space when stored data is short - text type handling is far more difficult 2) if you will use char type - it is stored in tablespace - you can do on-line archiving - you can search in char columns ((char)var matches "xxxx*" ...) - you will waste db space when stored data is short - char type handling is easy If i was you and I know the length of sored data can vary from 1 byte to 32kb, I'd use text type stored in tablespace. Michal Hajek -- -------------------------------------------------------------- Michal Hajek mailto:hajek@nspuh.cz Sprava NIS http://www.nspuh.cz NsP Uherske Hradiste phone : voice +420 0632 529 204 Purkynova 365 fax +420 0632 551 014 686 68 Uherske Hradiste Czech Republic --------------------------------------------------------------