>From: Peter Sylvester <peters@mitre.org>
>Date: Wed, 18 Sep 1996 07:43:06 -0400
>X-Informix-List-Id: <news.28178>
>
>Frank Dickinson wrote:
>> We have an application where we want to plan for some of our
>> tables to have more than 2 billion rows. [clip]
>> Frank Dickinson (frdi@gate.net)
>
>How about mapping multiple integer values to a character string. For
>(2) 32 bit integers, and mapping (6) bits to a (printable) character,
>you'll need (11) characters to get 2^64 (about 1.8e+19) values. [...]
I'd suggest using a DECIMAL(20,0) field to get 20-digit integer values
(using 11 bytes of storage), or a shorter value (such as DECIMAL(14,0)) if
your range is smaller. It would be much easier to handle these than the
coding scheme suggested above -- there are already tools in the database
system to handle such values (printing and conversion, etc), and the
languages that work with Informix databases also support it too. And the
values are immediately interpretable as numbers by the casual user who uses
DB-Access to view the values.
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>