Re: Keys larger than 2 Billion
Posted in 1996
"Mark D. Stock" <marks@west.co.za> wrote: :Leonid Belov wrote: :> :> 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 :Weeeell, you can drop the system index and create a composite index with the :serial column. Actually a very elegant solution, if the serial datatype keeps going round robin. (You might want to test that, or check with Informix.) A simple time field in addition would make it unique. :> 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. :If you use an insert trigger it gives you the NEW record BEFORE it is :inserted. So you can lookup the next key from another table and set the key :field BEFORE allowing the insert. I definitly wouldn't do this. With the volume of data you will have to insert having such a trigger fire for every row inserted would slow down the process very significantly. There are even new options now (I assume they have allways been there in XPS) to turn off indexing while doing mass loads. Nils.Myklebust@idg.no <- New E-mail adress NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company