Need Help tuning this Function
I have been trying to tune this function, however i do not know where to begin. Can anyone help me. i am using Oracle 8.1.7 and optimizer_mode=Rule.
FOR vcharge IN cchargerules
LOOP
-- execute the eligibility condition
DBMS_OUTPUT.PUT_LINE(vacct.account_id);
lnqueryresult :=
sbs_executequery (vacct.account_id,
pnperson_id,
vcharge.eligibility_condition
);
this is the function that is called
FUNCTION sbs_executequery (
pnaccount_id NUMBER,
pnperson_id NUMBER,
pvcquery VARCHAR2
)
RETURN NUMBER
IS
lvccompletequery VARCHAR2 (2000) := ' ';
lvcsingletable VARCHAR2 (100) := ' ';
lvcfromclause VARCHAR2 (255) := ' ';
lnfrompos NUMBER := 0;
lntablepos NUMBER := 0;
lnwherepos NUMBER := 0;
lnaliaspos NUMBER := 0;
lnssstablepos NUMBER := 0;
lvcaliastable VARCHAR2 (255) := ' ';
0