Sql statement taking very time [message #546861] |
Fri, 09 March 2012 06:15 |
|
Osafa
Messages: 14 Registered: July 2011 Location: Malaysia , KL
|
Junior Member |
|
|
Hi Guru,
One of my concurrent which calls a packaged procedure is taking enormous amount of time. The same concurrent was in its earlier runs, until last month getting completed in less than an hour. however its now taking almost 24hrs. I checked the AWR report and found that one particular query was taking huge time - more than 6hrs. The query is as follows:
SELECT CURRENCY_CODE FROM XXGL_NOP_WORKINGS WHERE 1=1 AND LEDGER_ID = :B3 AND PERIOD_NAME = :B2 AND BATCH_ID = :B1 GROUP BY CURRENCY_CODE ORDER BY CURRENCY_CODE;
I have two composite indexes on the table:
a. BATCH_ID", "ACCOUNT_CODE
b. BATCH_ID", "CURRENCY_CODE", "GROUP_NAME"
Thanks,
Karim.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|