Drastic Reduction of Possible Rows in a Table with TEXT and BYTE in the Tablespace
(Article written by CURSOR employee Andreas Seifert)
Usually, the table limits in an Informix instance are high enough to ensure a smooth operation of the instance. However, when using the old simple large objects TEXT and BYTE in Informix, this is not the case. Unlike the new smart large objects, these blobs cannot be stored in a smart blobspace and still have to be stored in the old blobspace.
The problem is that blobs (data types TEXT and BYTE) stored in old blobspaces are not logged in the logical log. This is a great disadvantage if you want to use a high-availability solution such as HDR, RSS or SDS. Since all of these solutions work by exchanging logical log information, objects that do not appear in the logical log will not be replicated.
The only way to log simple large objects in the logical log is to forego blobspaces and to store the blobs in the tablespace.
This is where the Informix table limits come into play. Informix allows rows up to 32KB wide. In our case, this limit is not problematic since rows including simple-large-object data only contain a 56-byte simple-large-object descriptor. What is problematic in our case is the limit that the maximum number of data pages per fragment is 16,777,215. The question now is whether the blob pages needed for a simple large object count towards this number.
The Informix documentation says nothing about this. In order to find out whether blob pages count as data pages, we have created a 100GB-sized chunk. As platform, we used Windows with a 4k page size. In the table with two text fields, we have inserted 300KB rows in a loop. The question was – how many rows can we insert?