to yuppc
还是不行啊,我刚试过,速度一样的。我执行的是这样的SQL:
SELECT USR_ID,PROD_CODE,CUST_NAME,
IMP_NEW.FUNC_GET_USER_SET_NAME(AREA_ID,PROD_ID,USR_ID) USER_SET_NAME,
IMP_NEW.FUNC_GET_VIP_NAME(AREA_ID,PROD_ID,VIP_ID) VIP_NAME,
DECODE(USER_DEGREE,0,'???',1,'??',2,'???',3,'???','???') USER_DEGREE,
TO_CHAR(ADD_MONTHS(TO_DATE(IMP_NEW.FUNC_GET_USER_DEGREE_DATE(AREA_ID,PROD_ID,BILL_CYCL,USR_ID),'YYYYMM'),12),'YYYYMM') USER_DEGREE_DATE,
IMP_NEW.FUNC_GET_USER_FEE(AREA_ID,PROD_ID,BILL_CYCL,USR_ID) NOW_FEE,
IMP_NEW.FUNC_GET_USER_FEE(AREA_ID,PROD_ID,IMP_NEW.FUNC_GET_BILL_CYCL(BILL_CYCL,-1),USR_ID) UP_FEE,
TRUNC((IMP_NEW.FUNC_GET_USER_FEE(AREA_ID,PROD_ID,BILL_CYCL,USR_ID) -IMP_NEW.FUNC_GET_USER_FEE(AREA_ID,PROD_ID,IMP_NEW.FUNC_GET_BILL_CYCL(BILL_CYCL,-1),USR_ID))/(IMP_NEW.FUNC_GET_USER_FEE(AREA_ID,PROD_ID,IMP_NEW.FUNC_GET_BILL_CYCL(BILL_CYCL,-1),USR_ID)+1),2) FEEBL,
FLOOR(MONTHS_BETWEEN(SYSDATE,TO_DATE(IMP_NEW.FUNC_GET_USER_DEGREE_DATE(AREA_ID,PROD_ID,BILL_CYCL,USR_ID),'YYYYMM'))) USER_DEGREE_MONTHS
FROM IMP_NEW.USER_FEE_INFO
WHERE BILL_CYCL='200210' AND USER_TYPE=0 AND PROD_ID='G'
它在sqlnavigator中执行是2秒左右,java中用了上面的方法都要1分种左右。