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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Which way is moer faster for this?

Re: Which way is moer faster for this?

From: Daniel Morgan <damorgan_at_exesolutions.com>
Date: Sun, 09 Jun 2002 07:12:13 +0100
Message-ID: <3D02F1BC.68C6C4F3@exesolutions.com>


C Chang wrote:

> I have a procedure to return a set of records such as p_b, p_a .. Among
> then, one of the record is return by using another record. so My
> question is that in the BEGIN section of the Procedure, Do I just use
> another
> p_b(count):= v_b; <-- v_b is the select result
> BEGIN
> SELECT a INTO v_a FROM table_B WHERE b = v_b;
> p_a(count):= v_a;
> EXCEPTION
> WHEN OTHERS THEN
> p_a(count):= NULL;
> END;
>
> -- Where v_b is the retrun value of the main select process of the
> procedure or I need to put the SELECT a INTO v_a FROM table_B WHERE b =
> v_b; in a function call
> so that for p_a ( which is the return variable), I just use the
> p_b(count):= v_b;
> p_a(count):= functionCall_a( v_b);
>
>
> p_# is the return variable.
>
> C Chang

The one that is benchmarked on your system with your platform (you don't tell us), your operating system (you don't tell us), your version of Oracle (you don't tell us), your initSID.ora configuration (you don't supply it) and your user/resource loading (you don't tell us), and we have no idea what your function does which could affect it too.

In other words, and not to be unhelpful, this is not something anyone can tell you off the top of their head. We find out these things by trying them in test environments and that is what you should do for yourself. Be sure to run each procedure at least three times. Don't just run each one once and take the faster. And be sure to EXPLAIN PLAN them too.

Daniel Morgan Received on Sun Jun 09 2002 - 01:12:13 CDT

Original text of this message

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