Re: re-numbering pimary-key

From: Ed prochak <ed.prochak_at_magicinterface.com>
Date: 17 Dec 2003 14:24:52 -0800
Message-ID: <4b5394b2.0312171424.3ef7b21d_at_posting.google.com>


Okay, you seem to prefer top posting, but I don't. Comments follow below.

Michael Hill <hillmw_at_ram.lmtas.lmco.com> wrote in message news:<3FDF6080.EB628529_at_ram.lmtas.lmco.com>...
> User wants to be neat
>
> >
> >
> > Why? is there a business reason, or do you just prefer to be neat?
> >
>

 Here's the followup question:
What are you going to do tomorrow when gaps reappear?

<and the oracle continues, saying>
you are about to ask, Why will the gaps come back? <end of another Matrix reference>

Since you are using a sequence, there are several values cached (essentially preallocated) with each session that uses that sequence. When you close that session, the unused values are "lost". As mentioned elsewhere in this thread, you need to read and understand the Concepts manual.

[]
>
> There are only 80 records in the table, but the numbering is up to 1046.
>
> >
> > Be I really cannot emphasize enough that you DON'T NEED to do this,
> > unless there is a real business reason.

But using this approach will require you to renumber after more records are added. So unless these tables are static, you will get gaps as new records are added. And what does the user want if some records geet deleted?

There are ways to get the sequence without gaps, but they are EXPENSIVE in terms of overhead and scalability. You really need to convince your client not to do this. They probably shouldn't need to see these values anyway. Don't do this just to be neat.

Ed Received on Wed Dec 17 2003 - 23:24:52 CET

Original text of this message