pl/sql condition evaluation

From: Joel Derby <jderby_at_empros.com>
Date: Fri, 29 Jul 1994 20:47:36 GMT
Message-ID: <Ctpz3C.GHA_at_empros.com>


Does anyone know if in evaluating a condition in say an IF statement whether pl/sql is smart enough to stop evaluation of a condition once it is unequivocally true or false, or will it allways evaluate the entire condition...

for example

  IF (a = 1) OR (b = 2) OR (c = 3) THEN

     ..do something
  END IF;
if a was equal to 1 does pl/sql not evaluate the b=2 or c=3, and just execute the commands in the body of the IF statement?

I'm sure the execution times are quite fast for these evaluations, but I'm wondering because we have some pl/sql code that is auto-generated and we end up with some quite large conditions in IF statements...

Thanks for any comments;
Joel Derby
Siemens E&A
Empros Power Systems Control Division Received on Fri Jul 29 1994 - 22:47:36 CEST

Original text of this message