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

Home -> Community -> Usenet -> c.d.o.tools -> Re: exceptions & performance

Re: exceptions & performance

From: Kenneth C Stahl <BlueSax_at_Unforgettable.com>
Date: 2000/05/16
Message-ID: <39213862.82E4A0EF@Unforgettable.com>#1/1

kal121_at_my-deja.com wrote:
>
> Is there any reason *not to* use an exception handler as a means of
> execution control in Oracle?
>
> Basically, I have a very simple procedure that does a SELECT. If and
> when the data is not found, I simply catch the exeception
> DATA_NOT_FOUND, then terminate the procedure.
>
> I was told by a java developer that catching exceptions is always
> expensive. Is this also true in Oracle?
>
> I can always declare an explicit cursor to check for %FOUND - is this a
> better way to accomplish this than using an exception handler? I
> suppose I can test this against a large data set, but the one I have
> isn't big enough at the moment. Any experiences?
>

Is there some overhead involved that takes some processor cycles? Yes. However, we are no longer in the IBM-PC world of 4.77Mhz processors. Using exceptions is a very expedient way of controlling program execution and it is something that is generally easy to maintain in comparison to the extensive extra coding that would be necessary to perform the work without using exceptions. Received on Tue May 16 2000 - 00:00:00 CDT

Original text of this message

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