When i attach this table it takes 4 hours.

Dear All,
when i amend CLASS_V_TABLE table it takes 4 hours. all joins are ok.
select
CLA.BRANCH,
REC.RECEIPT_DATE,
bank.bank_account_name,
1 a,
(SUM(APP.LINE_APPLIED) + NVL(SUM((SELECT NVL(PAY.AMOUNT_DUE_REMAINING,0)*(-1) FROM AR_PAYMENT_SCHEDULES_ALL PAY
WHERE PAY.CASH_RECEIPT_ID=REC.CASH_RECEIPT_ID
AND app.receivable_application_id=(select max(pay1.receivable_application_id) from ar_receivable_applications_all pay1
where pay1.cash_receipt_id=rec.cash_receipt_id)
)),0)) Receipts,
COUNT(REC.CASH_RECEIPT_ID) Receipt_No
FROM
AR_CASH_RECEIPTS_ALL REC,
AR_RECEIVABLE_APPLICATIONS_ALL APP,
RA_CUSTOMER_TRX_ALL TRX,
ap_bank_accounts_all bank,
bill_class_fee_structure fee,
bill_class CLASS,
CLASS_V_TABLE CLA
WHERE
REC.CASH_RECEIPT_ID=APP.CASH_RECEIPT_ID
AND DISPLAY='Y'
AND REC.TYPE='CASH'
AND APP.APPLIED_CUSTOMER_TRX_ID=TRX.CUSTOMER_TRX_ID
AND decode(TRX.ATTRIBUTE_CATEGORY,'Advance Challan',TRX.ATTRIBUTE3,TRX.ATTRIBUTE2)=CLA.Fee_Structure_Id
AND REC.RECEIPT_DATE > = nvl(TO_DATE(SUBSTR(:P_FROM_DATE,1,10),'YYYY/MM/DD'),REC.RECEIPT_DATE)
AND REC.RECEIPT_DATE < = nvl(TO_DATE(SUBSTR(:P_TO_DATE,1,10),'YYYY/MM/DD') ,REC.RECEIPT_DATE)
AND cla.BRANCH=nvl(:P_BRANCH_NAME,CLA.BRANCH)
AND cla.n_description = nvl(:p_network,cla.n_description)
AND trx.org_id=NVL(:P_ORG_ID,TRX.ORG_ID)
GROUP BY
bank.bank_account_name,
CLA.BRANCH,
REC.RECEIPT_DATE--,
Table structer is mentioned below.
DROP TABLE APPS.CLASS_V_TABLE CASCADE CONSTRAINTS;
CREATE TABLE APPS.CLASS_V_TABLE
CLASS_ID NUMBER NOT NULL,
CLASS_SHORT_NAME NUMBER,
CLASS_NAME VARCHAR2(100 BYTE) NOT NULL,
FEE_TYPE VARCHAR2(20 BYTE),
FEE_STRUCTURE_ID NUMBER NOT NULL,
BRANCH_ID VARCHAR2(100 BYTE) NOT NULL,
BRANCH VARCHAR2(240 BYTE),
PARENT_CLASS VARCHAR2(150 BYTE) NOT NULL,
NETWORK VARCHAR2(150 BYTE) NOT NULL,
N_DESCRIPTION VARCHAR2(240 BYTE),
REGION VARCHAR2(150 BYTE) NOT NULL,
R_DESCRIPTION VARCHAR2(240 BYTE),
ORG_ID NUMBER(15) NOT NULL,
CLASS_ORIGINAL_ID VARCHAR2(20 BYTE)
TABLESPACE APPS_TS_TX_DATA
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 128K
NEXT 128K
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOGGING
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING;
CREATE INDEX APPS.CLASS_V_FE_ST_ID ON APPS.CLASS_V_TABLE
(FEE_STRUCTURE_ID)
LOGGING
TABLESPACE APPS_TS_TX_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 128K
NEXT 128K
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
NOPARALLEL;
CREATE INDEX APPS.CLASS_BRANCH_ID_IDX ON APPS.CLASS_V_TABLE
(BRANCH_ID)
LOGGING
TABLESPACE APPS_TS_TX_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 128K
NEXT 128K
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
NOPARALLEL;
Regards
HM

>
when i amend CLASS_V_TABLE table it takes 4 hours. all joins are ok.
>
I see no amend - I only see a select statement. What do you mean by all joins are OK?
Anyway you need to give more information.
Please read {message:id=9360003} and follow the advice given.

Similar Messages

Maybe you are looking for

  • Pan & Zoom multilayered PSDs. Help needed

    Hi All, I've got an edit I need to finish pronto then another one this coming monday and need to get some questions answered before then or in serious trouble! Additional details: Running FCP 5 We have a client that wants to do an animatic (motion gr

  • Problem in settlement of Refurbishment order

    Hi Gurus, I have problem in the settlement (KO88) of refurbishment order. I am getting error " Final delivery not entered for the order. It is not technically completed" Message no. KD258 But i have already done final delivery in T-code IW8W & Techni

  • Deprecated methods in 10.1.3

    Many methods in 10.1.3 are marked as deprecated. For example, class oracle.toplink.publicinterface.Descriptor is replaced by ClassDescriptor and RelationalDescriptor where getQueryManager() is deprecated with no replacement method. Another example, i

  • Solman 7.0 :  setup system monitoring

    hi I am taking an error while I want to configure the system monitoring in solman 7.0 solution monitoring-->sys monitoring  --> setup sys monitoring the CCMS Read Destination status is RED.but I have tested  the CCMS Read Dest. by double clicking rel

  • Duplicated entries in the Library-Runbooks section

    Hi We recently changed the URL where SCSM should read the SCO Runbooks from. However, after we initiated a new SCO connector sync, the Library is populated with duplicate entries, from both the old URL and the new URL (see the screenshot below). From