執行delete item information 發現刪除一顆料需要2~3分鐘,所以做trace,發現瓶頸點是這段 SQL:
SELECT 1
FROM DUAL
WHERE :ORGANIZATION_ID =
(SELECT TO_NUMBER(PROFILE_OPTION_VALUE)
FROM FND_PROFILE_OPTIONS FPO,
FND_PROFILE_OPTION_VALUES FPOV
WHERE FPO.PROFILE_OPTION_NAME ='SP_ORGANIZATION_ID'
AND FPO.PROFILE_OPTION_ID = FPOV.PROFILE_OPTION_ID
AND FPO.APPLICATION_ID = FPOV.APPLICATION_ID
AND FPOV. LEVEL_ID = 10001)
AND EXISTS
(SELECT NULL
FROM QP_PRICING_ATTRIBUTES
WHERE PRODUCT_ATTRIBUTE_CONTEXT = 'ITEM'
AND PRODUCT_ATTRIBUTE = 'PRICING_ATTRIBUTE1'
AND PRODUCT_ATTR_VALUE IS NOT NULL
AND PRODUCT_ATTR_VALUE <> 'ALL'
AND PRODUCT_ATTR_VALUE = :ITEM_ID
UNION
SELECT NULL
FROM QP_PRICING_ATTRIBUTES
WHERE PRODUCT_ATTRIBUTE_CONTEXT = 'ITEM'
AND PRODUCT_ATTRIBUTE = 'PRICING_ATTRIBUTE1'
AND PRODUCT_ATTR_VALUE IS NOT NULL
AND COMPARISON_OPERATOR_CODE = '='
AND PRICING_ATTR_VALUE_FROM = :ITEM_ID)
前往metalink尋找到Note: 1063320.1 Performance Problem When Delete Items (BMCDEL)
發現到有相同的SQL語句,建議apply patch 9273708
### 原因 ###
The issue is caused by the Advance Pricing Delete constraint query. The problem is identified in the bug Bug:9273708 . This regression bug was due to the change done as per Bug:7503062
### 解決方式 ###
1. Download and review the readme and pre-requisites for Patch:9273708
2. Ensure that you have taken a backup of your system before applying the recommended patch.
3. Apply the patch in a test environment.
4. Confirm the following file versions:
$BOM_TOP/patch/115/import/US/bomdelc.ldt should have version 115.14.115100.44
You can use the commands like the following:
strings -a $BOM_TOP/patch/115/import/US/bomdelc.ldt |grep '$Header'.
5. Retest the issue.
6. Migrate the solution as appropriate to other environments.
### 防範措施 ###
N/A
沒有留言:
張貼留言