Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: sequence number

Re: sequence number

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Mon, 08 Nov 2004 19:20:37 -0800
Message-ID: <1099970363.636202@yasure>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US