RE: Best Way to Auto Increment with Oracle

2004-07-06 Thread Helck, Timothy
this? Tim Helck -Original Message- From: Jared Still [mailto:[EMAIL PROTECTED] Sent: Monday, July 05, 2004 9:45 PM To: Kipp, James Cc: 'Reidy, Ron'; Jim; DBI List Subject: RE: Best Way to Auto Increment with Oracle On Wed, 2004-06-16 at 08:43, Kipp, James wrote: Your program

RE: Best Way to Auto Increment with Oracle

2004-07-06 Thread Reidy, Ron
] Sent: Monday, July 05, 2004 9:45 PM To: Kipp, James Cc: 'Reidy, Ron'; Jim; DBI List Subject: RE: Best Way to Auto Increment with Oracle On Wed, 2004-06-16 at 08:43, Kipp, James wrote: Your program connects via SQL*net to the DB. At insert time, you need to fetch a sequence, so you issue

RE: Best Way to Auto Increment with Oracle

2004-07-06 Thread Ronald J Kimball
Reidy, Ron [mailto:[EMAIL PROTECTED] wrote: Am I right to think that the following is nearly as efficient as a trigger-based approach? insert into customer(customer_id, first, last) values(customer_id_seq.nextval, 'Homer', 'Simpson'); insert into address(address_id,

RE: Best Way to Auto Increment with Oracle

2004-07-06 Thread Helck, Timothy
] Sent: Tuesday, July 06, 2004 10:06 AM To: Helck, Timothy; Jared Still; Kipp, James Cc: Jim; DBI List Subject: RE: Best Way to Auto Increment with Oracle Comments below ... - Ron Reidy Senior DBA Array BioPharma, Inc. -Original Message- From: Helck, Timothy [mailto

RE: Best Way to Auto Increment with Oracle

2004-07-06 Thread Reidy, Ron
Senior DBA Array BioPharma, Inc. -Original Message- From: Helck, Timothy [mailto:[EMAIL PROTECTED] Sent: Tuesday, July 06, 2004 8:34 AM To: Reidy, Ron; Jared Still; Kipp, James Cc: Jim; DBI List Subject: RE: Best Way to Auto Increment with Oracle -- OK, RETURNING is good, I can see

RE: Best Way to Auto Increment with Oracle

2004-07-05 Thread Jared Still
On Wed, 2004-06-16 at 08:43, Kipp, James wrote: Your program connects via SQL*net to the DB. At insert time, you need to fetch a sequence, so you issue 'select seq.nextval from dual'. Seems harmless enough until ... 1. The select statement must be passed across the SQL*Net

Re: Best Way to Auto Increment with Oracle

2004-06-16 Thread Peter J. Holzer
On 2004-06-16 05:21:07 -0700, Jim wrote: I am looking for suggestions on the best way to auto increment a key column in a oracle table. I know I can do this inside of Oracle by creating a sequence and then a trigger. BUT, is it better to make DBI do this when I insert the data? I guess

RE: Best Way to Auto Increment with Oracle

2004-06-16 Thread Kipp, James
On 2004-06-16 05:21:07 -0700, Jim wrote: I am looking for suggestions on the best way to auto increment a key column in a oracle table. I know I can do this inside of Oracle by creating a sequence and then a trigger. BUT, is it better to make DBI do this when I insert the data? I

RE: Best Way to Auto Increment with Oracle

2004-06-16 Thread Andy Crichton
J. Holzer [mailto:[EMAIL PROTECTED] Sent: 16 June 2004 14:04 To: [EMAIL PROTECTED] Subject: Re: Best Way to Auto Increment with Oracle On 2004-06-16 05:21:07 -0700, Jim wrote: I am looking for suggestions on the best way to auto increment a key column in a oracle table. I know I can do

RE: Best Way to Auto Increment with Oracle

2004-06-16 Thread Reidy, Ron
Better? Maybe. Consider. Your program connects via SQL*net to the DB. At insert time, you need to fetch a sequence, so you issue 'select seq.nextval from dual'. Seems harmless enough until ... 1. The select statement must be passed across the SQL*Net connection. 2. The statement must be

RE: Best Way to Auto Increment with Oracle

2004-06-16 Thread David Goodman
Hello Ron: Let me naively ask, why you would not use a stored procedure to get rid of the network interaction? That or just bundle up the two statements in one execution. regards, David --- Reidy, Ron [EMAIL PROTECTED] wrote: Better? Maybe. Consider. Your program connects via SQL*net to

RE: Best Way to Auto Increment with Oracle

2004-06-16 Thread Reidy, Ron
, Inc. -Original Message- From: David Goodman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 9:27 AM To: [EMAIL PROTECTED] Subject: RE: Best Way to Auto Increment with Oracle Hello Ron: Let me naively ask, why you would not use a stored procedure to get rid of the network

RE: Best Way to Auto Increment with Oracle

2004-06-16 Thread Kipp, James
Better? Maybe. Consider. Your program connects via SQL*net to the DB. At insert time, you need to fetch a sequence, so you issue 'select seq.nextval from dual'. Seems harmless enough until ... 1. The select statement must be passed across the SQL*Net connection. 2. The

RE: Best Way to Auto Increment with Oracle

2004-06-16 Thread Gaul, Ken
] -Original Message- From: Kipp, James [mailto:[EMAIL PROTECTED] Sent: 16 June 2004 16:44 To: 'Reidy, Ron'; Jim; [EMAIL PROTECTED] Subject: RE: Best Way to Auto Increment with Oracle Better? Maybe. Consider. Your program connects via SQL*net to the DB. At insert time, you need to fetch

Re: Best Way to Auto Increment with Oracle

2004-06-16 Thread Peter J. Holzer
On 2004-06-16 09:14:25 -0600, Reidy, Ron wrote: Better? Maybe. Consider. Your program connects via SQL*net to the DB. At insert time, you need to fetch a sequence, so you issue 'select seq.nextval from dual'. Seems harmless enough until ... 1. The select statement must be passed

RE: Best Way to Auto Increment with Oracle

2004-06-16 Thread Reidy, Ron
, Inc. -Original Message- From: Peter J. Holzer [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 9:46 AM To: [EMAIL PROTECTED] Subject: Re: Best Way to Auto Increment with Oracle On 2004-06-16 09:14:25 -0600, Reidy, Ron wrote: Better? Maybe. Consider. Your program connects

RE: Best Way to Auto Increment with Oracle

2004-06-16 Thread Gaul, Ken
- From: Peter J. Holzer [mailto:[EMAIL PROTECTED] Sent: 16 June 2004 16:46 To: [EMAIL PROTECTED] Subject: Re: Best Way to Auto Increment with Oracle On 2004-06-16 09:14:25 -0600, Reidy, Ron wrote: Better? Maybe. Consider. Your program connects via SQL*net to the DB. At insert time, you

Re: Best Way to Auto Increment with Oracle

2004-06-16 Thread David Goodman
Doesn't an Oracle before insert trigger carry extra performance overhead? --- Peter J. Holzer [EMAIL PROTECTED] wrote: On 2004-06-16 09:14:25 -0600, Reidy, Ron wrote: Better? Maybe. Consider. Your program connects via SQL*net to the DB. At insert time, you need to fetch a sequence, so

RE: Best Way to Auto Increment with Oracle

2004-06-16 Thread Reidy, Ron
for the client. - Ron Reidy Senior DBA Array BioPharma, Inc. -Original Message- From: David Goodman [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 9:59 AM To: [EMAIL PROTECTED] Subject: Re: Best Way to Auto Increment with Oracle Doesn't an Oracle before insert

RE: Best Way to Auto Increment with Oracle

2004-06-16 Thread Ian Harisay
. Holzer [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 16, 2004 9:46 AM To: [EMAIL PROTECTED] Subject: Re: Best Way to Auto Increment with Oracle On 2004-06-16 09:14:25 -0600, Reidy, Ron wrote: Better? Maybe. Consider. Your program connects via SQL*net to the DB. At insert time, you

RE: Best Way to Auto Increment with Oracle

2004-06-16 Thread Steve Baldwin
statement could conceivably fail. Steve -Original Message- From: Ian Harisay [mailto:[EMAIL PROTECTED] Sent: Wednesday, 16 June 2004 1:26 PM To: [EMAIL PROTECTED] Subject: RE: Best Way to Auto Increment with Oracle I would disagree with this last statement. you are gauranteed

RE: Best Way to Auto Increment with Oracle

2004-06-16 Thread Jeff Urlwin
Better? Maybe. Consider. Your program connects via SQL*net to the DB. At insert time, you need to fetch a sequence, so you issue 'select seq.nextval from dual'. Seems harmless enough until ... 1. The select statement must be passed across the SQL*Net connection. 2.

RE: Best Way to Auto Increment with Oracle

2004-06-16 Thread Jeff Urlwin
The difference is: With a trigger, you hide the details of the sequence from the insert statement. This makes the insert statement simpler and more portable. OTOH, you don't know which value you just inserted (you can get at it with select $sequence.currval from dual but then you