Pros & Cons for text datatype.
Posted in 2013
Topics: Data Types & Schema Design, Platform-Specific Issues
Hello , I am using IDS11.50FC8W3 for Solaris, now i want to use text data type for some tables. kindly provide me pros & cons for text data type. Thanks.
Here are some observations for data-types which can be used to hold more than 255 characters (a limitation for varchar) though char type may contain more data but it pads spaces and consumer more space. We compared lvarchar and text data-type A1: If an lvarchar column is added in a table it locks the table for long time depending upon number of rows in that table. A2: If an lvarchar column already exists in a table a drop/add column takes long time B1: A text type column addition completes within a second B2: Column add/drop takes a second for a table which contains a text column. Also no impact found on update stats time. B3: Dropping a text type column is extremely slow text type not contribute in 32K row length limitation DML operations are not allowed through SQL insert/update See following link for further details: http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.sq lr.doc/sqlrmst136.htm But in following link, Jonathan Leffler oppose to choose text data-type: http://stackoverflow.com/questions/483284/consistent-method-of-inserting-text-co lumn-to-informix-database-using-jdbc-and-o And we are not able to see any issue so far. Is there any known issue with text-type?
TEXT columns stored IN a blobspace do not replicate because they are not logged. TEXT columns stored IN TABLE (default) will use up the table's extent and maximum pages per partition rather quickly. The best solution for truly variable text like user comments may be a child table with a reasonable CHAR column, the parent table's primary key, and a sequential number. That will allow you to hon virtually unlimited text with little waste and few of the consequences and problems inherent in using a single huge column. Art Art S. Kagel, Principal Consultant Advanced DataTools (www.advancedatatools.com) Blog: http://informix-myview.blogspot.com/ Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Wed, Dec 11, 2013 at 11:00 AM, KAMRAN HAQ <khaq@i2cinc.com> wrote: > Here are some observations for data-types which can be used to hold more > than > 255 characters (a limitation for varchar) though char type may contain more > data but it pads spaces and consumer more space. > > We compared lvarchar and text data-type > > A1: If an lvarchar column is added in a table it locks the table for long > time > depending upon number of rows in that table. > A2: If an lvarchar column already exists in a table a drop/add column takes > long time > > B1: A text type column addition completes within a second > B2: Column add/drop takes a second for a table which contains a text > column. > Also no impact found on update stats time. > B3: Dropping a text type column is extremely slow > > text type not contribute in 32K row length limitation > > DML operations are not allowed through SQL insert/update > > See following link for further details: > > > http://publib.boulder.ibm.com/infocenter/idshelp/v10/index.jsp?topic=/com.ibm.sq lr.doc/sqlrmst136.htm > > But in following link, Jonathan Leffler oppose to choose text data-type: > > > http://stackoverflow.com/questions/483284/consistent-method-of-inserting-text-co lumn-to-informix-database-using-jdbc-and-o > > And we are not able to see any issue so far. > > Is there any known issue with text-type? > > > > ******************************************************************************* > Forum Note: Use "Reply" to post a response in the discussion forum. > > --089e0141a46c64b17404ed4c15ab