不同使用者同樣環境同樣的SQL執行計劃不共享問題(AUTH_CHECK_MISMATCH)
Cursor not shared for different users
My colleague Peter Kramsu came to me and wanted to discuss an interesting problem. This is a summary of his findings.
Problem Details:
Same query executed by two different users where the query for the owner/creator of the data ran quick and for the other users the query was slow.
We saw two different execution plans, the owner of the tables/views had the better plan and the other user had the poor plan.
The other user accessed the views using synonyms.
The version of the database is 11.2.0.3.0 and it is running on Redhat Linux.
Analyze:
We checked the view V$SQL_SHARED_CURSOR to see if we could get some information why the cursor wasn’t shared
select * from v$sql_shared_cursor where sql_id=’fbryy8xmxc51z’;
We could see that there were some columns that differed:
AUTH_CHECK_MISMATCH (Y|N) Authorization/translation check failed for the existing child cursor
INSUFF_PRIVS (Y|N) Insufficient privileges on objects referenced by the existing child cursor
We searched My Oracle Support and found BUG 11930680
Description
This problem is introduced in 10.2.0.5 and 11.2.0.2 .
If optimizer_secure_view_merging is enabled then some SQL statements may
not be shared due to AUTH_CHECK_MISMATCH / INSUFF_PRIVS even if the
SQL is issued repeatedly by the same user. This can cause excess shared
pool memory use and other contention issues due to the high child cursor
count.
Workaround
The only workaround is to set optimizer_secure_view_merging=false
which may not be acceptable in many cases
This bug talked about the same user and we had different users and also it was listed as fixed for 11.2.0.3.0 that we are running.
So we continued to search on Oracle support.
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-772489/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- 【問題處理】同樣的並行表,同樣的索引結構,不同的執行計劃並行索引
- 同樣SQL同樣執行計劃在不同節點執行時間差很遠SQL
- 同樣的sql執行結果不同的原因分析SQL
- 執行時間在1秒以下的SQL同樣也會引發效能問題SQL
- 故障分析 | MySQL 相同 SQL 不同環境執行時間不一樣案例分析MySql
- 同樣的SQL,怎麼突然就慢了?SQL
- 同樣是程式設計師 為什麼薪資不同程式設計師
- Oracle 同一sql語句在測試和開發環境不同的執行計劃OracleSQL開發環境
- 怎樣看懂Oracle的執行計劃Oracle
- 為啥同樣的邏輯在不同前端框架中效果不同前端框架
- 怎樣得到準確的執行計劃
- 怎樣看懂Oracle的執行計劃[轉]Oracle
- 同樣的故事,只是時間地點任務有些不同
- 同樣的工作、同樣的做需求,為什麼他們能進阿里阿里
- SQL執行計劃異常引起的效能問題SQL
- SQL執行計劃異常 引起的效能問題SQL
- oracle同|導庫導表(同使用者/不同使用者)Oracle
- oracle 11g新特性Cardinality Feedback基數反饋造成同一sql幾乎同時執行產生不同的執行計劃OracleSQL
- 同時多個SQL命令執行的方法SQL
- 越南的遊戲市場同樣遭遇了嚴重的“盜版問題”遊戲
- 協同平臺新增的sql指令碼, 同步後不生效問題SQL指令碼
- SQL優化案例-從執行計劃定位SQL問題(三)SQL優化
- 不同環境下的mvn執行指令
- 這樣的執行問題請教高手
- 將指定SQL的執行計劃從共享池刪除SQL
- 同樣 3 年前端程式設計師,為什麼結局截然不同?前端程式設計師
- 【OUTLINE】環境不滿足OUTLINE記錄的執行計劃時會選擇其他執行計劃
- 同義詞相似度可以怎樣計算
- SQL的執行計劃SQL
- [20221104]執行計劃一樣Plan hash value不同.txt
- 同樣是改需求,高手和菜鳥究竟有什麼不同?
- 同樣是智慧語音,雲訊雲雀哪裡與眾不同?
- 利用statspack來獲取生成環境中top SQL及其執行計劃SQL
- Oracle 執行計劃 分析和動態取樣Oracle
- SQL最佳化案例-從執行計劃定位SQL問題(三)SQL
- sql 執行計劃SQL
- 不賣知識賣服務同樣能賺大錢
- 一模一樣的SQL重新解析即重新生成執行計劃的方法SQL