Re: Exhaused sequence

  • From: Thomas Day <tomday2@xxxxxxxxx>
  • To: "Oracle-L@xxxxxxxxxxxxx" <Oracle-L@xxxxxxxxxxxxx>
  • Date: Thu, 17 Feb 2005 18:50:04 -0800

During off hours create a table that has all the missing numbers from
your column.  Select your new customer number by selecting
min(missing_number) from that table and then have an after insert
trigger that deletes the min(missing_number).  When your new table has
0 rows you're done.

It'll get rid of the slow inserts from real-time searching for
available numbers but your customer should re-think their business
rule.  Unless they plan on limiting their growth they need to expand
the column.

Other related posts: