0

I have a procedure that is run often (~1000x every 5 mins) in Oracle 10g. The basic idea is to refresh data in a table based on the PK.

Which has a better performance in terms of IO/CPU load on the database? DELETE by PK then INSERT or a MERGE on PK?

Paul
  • 3,725
  • 12
  • 50
  • 86

1 Answers1

1

MERGE is almost always slower then special crafted DELETEs with BULK INSERTs. Its only more convient to use in some cases.

On the other hand, if you don't use any tricks to speedup your queries performance will be almost the same.

Nagh
  • 1,757
  • 1
  • 14
  • 19