- 论坛徽章:
- 0
|
之前的应用在9I上开发的,在10g上运行很不稳定,取得执行频率最高的SQL语句是如下:
SELECT 0,
'',
A.OWNER,
B.TABLE_NAME,
B.INDEX_NAME,
B.COLUMN_NAME,
C.COLUMN_ID,
'',
A.UNIQUENESS,
B.DESCEND
FROM SYS.ALL_INDEXES A, SYS.ALL_IND_COLUMNS B, SYS.ALL_TAB_COLUMNS C
WHERE A.OWNER LIKE 'PM'
AND A.TABLE_NAME LIKE 'dual'
AND A.INDEX_NAME LIKE '%'
AND A.OWNER = B.INDEX_OWNER
AND A.INDEX_NAME = B.INDEX_NAME
AND B.TABLE_NAME = C.TABLE_NAME
AND B.COLUMN_NAME = C.COLUMN_NAME
AND C.OWNER = B.TABLE_OWNER
ORDER BY B.INDEX_OWNER, B.TABLE_NAME, B.INDEX_NAME, B.COLUMN_POSITION
SELECT 0,
'',
A.OWNER,
B.TABLE_NAME,
B.INDEX_NAME,
B.COLUMN_NAME,
C.COLUMN_ID,
'',
A.UNIQUENESS,
B.DESCEND
FROM SYS.ALL_INDEXES A, SYS.ALL_IND_COLUMNS B, SYS.ALL_TAB_COLUMNS C
WHERE A.OWNER LIKE 'PM'
AND A.TABLE_NAME LIKE 'CHPM_TYPE'
AND A.INDEX_NAME LIKE '%'
AND A.OWNER = B.INDEX_OWNER
AND A.INDEX_NAME = B.INDEX_NAME
AND B.TABLE_NAME = C.TABLE_NAME
AND B.COLUMN_NAME = C.COLUMN_NAME
AND C.OWNER = B.TABLE_OWNER
ORDER BY B.INDEX_OWNER, B.TABLE_NAME, B.INDEX_NAME, B.COLUMN_POSITION
可这并不是我们自己写的语句,不知是如何产生的,是否可以跟踪产生的原因?对性能是否会有什么影响? |
|