我正在尝试运行一个查询而其失败是由于" ORA-07455:估计执行时间(386781721秒),超过限制(86400秒)"
你能不能给我一些建议来解决这个问题?这是我试过的查询:
SELECT DISTINCT
batch.id,
UPPER(TRIM(NVL(t2.user_login, DECODE( INSTR(CAST(T.COLUMN_VALUE.EXTRACT('//text()') AS VARCHAR2(200)),'@',1,1),0,CAST(T.COLUMN_VALUE.EXTRACT('//text()') AS VARCHAR2(200)),
SUBSTR(CAST(T.COLUMN_VALUE.EXTRACT('//text()') AS VARCHAR2(200)),1, (INSTR(CAST(T.COLUMN_VALUE.EXTRACT('//text()') AS VARCHAR2(200)),'@',1,1)-1)))))) AS USER_LOGIN,
UPPER(CAST(t.COLUMN_VALUE.EXTRACT('//text()') AS VARCHAR2(200))) AS EMAIL_ADDRESS ,
t1.BATCH_ID,
t1.CREATED_BY
FROM
message t1,
TABLE( xmlsequence( XMLTYPE( '<x><x>' || REPLACE(t1.RECIPIENTS, ',', '</x><x>') || '</x></x>' ).EXTRACT('//x/*'))) t, --CHR(13) ||CHR(10)
BATCH,
(
SELECT DISTINCT
user_login,
sender
FROM
MESSAGE, BATCH
where BATCH.ID = MESSAGE.ID and BATCH.ID=1
)
t2
WHERE
BATCH.BATCH_ID = t1.BATCH_ID
AND CAST(t.COLUMN_VALUE.EXTRACT('//text()') AS VARCHAR2(200)) = t2.sender(+)
and t1.id=1
ORDER BY batch.id, USER_LOGIN
这是我试图执行的查询。