dbTalk Databases Forums  

upsert strategies?

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss upsert strategies? in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: upsert strategies? - 11-12-2008 , 01:30 PM






mh (AT) pixar (DOT) com wrote:
Quote:
So far, I've figured out 4 possible ways to perform upsert-like
functionality:

1. try insert, on exception update
2. try update, on exception insert
3. delete, then insert
4. merge with DUAL

It seems so far the nicest solution is #4.

Here's some questions:

- Do the other methods have any features which might recommend them?

- Are there any methods that might be portable to other databases?

- Are there any methods I might be overlooking?

Many TIA!
Mark

Search asktom.oracle.com for "upsert" - he has documented, timed
examples of why you should use merge

--

Regards,
Frank van Bortel


Reply With Quote
  #12  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: upsert strategies? - 11-12-2008 , 01:30 PM






mh (AT) pixar (DOT) com wrote:
Quote:
So far, I've figured out 4 possible ways to perform upsert-like
functionality:

1. try insert, on exception update
2. try update, on exception insert
3. delete, then insert
4. merge with DUAL

It seems so far the nicest solution is #4.

Here's some questions:

- Do the other methods have any features which might recommend them?

- Are there any methods that might be portable to other databases?

- Are there any methods I might be overlooking?

Many TIA!
Mark

Search asktom.oracle.com for "upsert" - he has documented, timed
examples of why you should use merge

--

Regards,
Frank van Bortel


Reply With Quote
  #13  
Old   
Frank van Bortel
 
Posts: n/a

Default Re: upsert strategies? - 11-12-2008 , 01:30 PM



mh (AT) pixar (DOT) com wrote:
Quote:
So far, I've figured out 4 possible ways to perform upsert-like
functionality:

1. try insert, on exception update
2. try update, on exception insert
3. delete, then insert
4. merge with DUAL

It seems so far the nicest solution is #4.

Here's some questions:

- Do the other methods have any features which might recommend them?

- Are there any methods that might be portable to other databases?

- Are there any methods I might be overlooking?

Many TIA!
Mark

Search asktom.oracle.com for "upsert" - he has documented, timed
examples of why you should use merge

--

Regards,
Frank van Bortel


Reply With Quote
  #14  
Old   
sybrandb@hccnet.nl
 
Posts: n/a

Default Re: upsert strategies? - 11-12-2008 , 04:47 PM



On Tue, 28 Oct 2008 12:19:20 -0700 (PDT), ddf <oratune (AT) msn (DOT) com> wrote:

Quote:
You're better served by writing to the dbms
in use, not attempting to generate 'universal' code which likely won't
scale nor will it perform.

No problem. This will be resolved when Burleson brings in SSD disks

--


Sybrand Bakker
Senior Oracle DBA


Reply With Quote
  #15  
Old   
sybrandb@hccnet.nl
 
Posts: n/a

Default Re: upsert strategies? - 11-12-2008 , 04:47 PM



On Tue, 28 Oct 2008 12:19:20 -0700 (PDT), ddf <oratune (AT) msn (DOT) com> wrote:

Quote:
You're better served by writing to the dbms
in use, not attempting to generate 'universal' code which likely won't
scale nor will it perform.

No problem. This will be resolved when Burleson brings in SSD disks

--


Sybrand Bakker
Senior Oracle DBA


Reply With Quote
  #16  
Old   
sybrandb@hccnet.nl
 
Posts: n/a

Default Re: upsert strategies? - 11-12-2008 , 04:47 PM



On Tue, 28 Oct 2008 12:19:20 -0700 (PDT), ddf <oratune (AT) msn (DOT) com> wrote:

Quote:
You're better served by writing to the dbms
in use, not attempting to generate 'universal' code which likely won't
scale nor will it perform.

No problem. This will be resolved when Burleson brings in SSD disks

--


Sybrand Bakker
Senior Oracle DBA


Reply With Quote
  #17  
Old   
sybrandb@hccnet.nl
 
Posts: n/a

Default Re: upsert strategies? - 11-12-2008 , 04:47 PM



On Tue, 28 Oct 2008 12:19:20 -0700 (PDT), ddf <oratune (AT) msn (DOT) com> wrote:

Quote:
You're better served by writing to the dbms
in use, not attempting to generate 'universal' code which likely won't
scale nor will it perform.

No problem. This will be resolved when Burleson brings in SSD disks

--


Sybrand Bakker
Senior Oracle DBA


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.