Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: sequence number
db2group88_at_yahoo.com wrote:
> before, we use DB2 identity column to generate auto number for each
> row for unique number.our application has thousands table and each one
> required to have one identity column. now we switch to oracle db 10g,
> as i know we can use sequence number to generate the number. but i
> would like to know from performance standpoint. is it better to give
> sequence to each table or use one sequence for the whole database.
> thanks
There is no "better". What you choose to do depends on your application logic.
There are many advantages to sequences ... one of which is the ability to cache them in memory. Another is the ability to use one for many tables. And still another is the ability to reset them on-the-fly.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace 'x' with 'u' to respond)Received on Mon Nov 08 2004 - 21:20:37 CST