Re: Keys larger than 2 Billion
Posted in 1996
>> We have an application where we want to plan for some of our >> tables to have more than 2 billion rows. Currently we have a >> primary key that is a SERIAL type column, but this will only >> handle unique IDs up to 2 billion rows. We have thought about >> having a composite primary key with the first value being a >> julian day or some kind of month and a second column that is >> serial. Serial key will be unique across the whole table regardless of what you use as primary key - single column or composite key. If you want to have so much rows you _cannot_ use serial column >> Another idea is to handle incrementing ourselves by >> storing a current value in some control table, but this will add >> more overhead to an insert........... You cannot use insert-trigger because you need to modify same table in your INSERT statement and in the trigger. It seems to me that your idea with control table is only reasonable for Informix. Leonid