Tom Price wrote:

> Catching errors on Oracle is really, really slow. How about a 
> BEGIN block that attempts to select the record and does this 
> logic in SQL?

Well, it's my DB2 experience/Oracle ignorance that was showing.  It's true
though, that you will pay a price for attempting the insert and then
catching the exception.  The select is probably a better route, simply
because you don't force the error condition.  Additionally it will work
where there is no primary key constraint for the target table, where as my
suggestion would just blindly insert a duplicate row (or key).  

Regarding Tim's original question, however, I thought he was trying to do
the insert into the MySql database, so I'm not sure that Oracle error
handler will impact him much.  Does MySql support cursors for updates?

Stph

Reply via email to