Home » RDBMS Server » Server Administration » QUERY TUNE
QUERY TUNE [message #56210] Wed, 12 March 2003 18:49 Go to next message
oracle
Messages: 9
Registered: May 2002
Junior Member
Hi
Can someone please help me tune this query.

SELECT SUM(TD_UNITS),TD_ACC_CODE,TD_DIV_CODE,TD_BASIS_POINT_TOTAL
FROM
T_LIPE_POLICY_REINSURANCE,
T_LIPC_POLICY_COMMON,
T_LITC_TRANSACTION_COMMON TC,
T_LITD_TRANSACTION_DETAIL TD

WHERE
PC_POL_NUM=PE_POL_NUM
AND PC_CVG_ID=PE_CVG_ID
AND PE_REINS_CODE='C'
AND TC_POL_NUM=PC_POL_NUM
AND TC_CVG_ID = PC_CVG_ID
AND TD_TXN_NUM=TC_TXN_NUM
AND TC_TXN_NUM=(SELECT MAX(TC_TXN_NUM)
FROM T_LITC_TRANSACTION_COMMON,T_LITD_TRANSACTION_DETAIL
WHERE TC_TXN_STATUS='D'
AND TC_TXN_NUM = TD_TXN_NUM
AND TC_POL_NUM=TC.TC_POL_NUM
AND TD_ACC_CODE = TD.TD_ACC_CODE
AND TD_DIV_CODE = TD.TD_DIV_CODE
AND TD_BASIS_POINT_TOTAL = TD.TD_BASIS_POINT_TOTAL
AND TD_DPST_DATE = TD.TD_DPST_DATE
AND TD_INT_RATE = TD.TD_INT_RATE
AND TRUNC(TC_TXN_DATE) <= LAST_DAY(ADD_MONTHS((SELECT MAX(TRUNC(PV_VALUATION_DATE))
FROM T_LIPV_SUN_POLICY_VALUATION),-1)) )

GROUP BY
TD_ACC_CODE,TD_DIV_CODE,TD_BASIS_POINT_TOTAL

Thanks
Re: QUERY TUNE [message #56259 is a reply to message #56210] Fri, 14 March 2003 10:35 Go to previous message
Michel Bartov
Messages: 35
Registered: February 2003
Member
It is difficult to tune a query without having access to the database.

I just posted an integrated set of GUI tools to administer the Oracle database.
One of the many functions is to tune an SQL query. The function is “Analyze SQL Statements” in the SQL group. It allows you to view the analyze output and try different scenarios to tune the query (including using indexes). You may need same help to get started, so feel free to contact me (michelbartov@go.com). The link is http://www.barsoft.net/
Previous Topic: Urgent :ORA-03113 End of Communication on Query
Next Topic: gain space in table after deleting many records
Goto Forum:
  


Current Time: Fri Sep 20 07:37:55 CDT 2024