当前位置:网站首页>One case of SQL performance degradation caused by modifying implicit parameters
One case of SQL performance degradation caused by modifying implicit parameters
2022-06-22 22:38:00 【Tiger Liu】
A customer found one that had been implemented for a long time (15.8 Hours ) Not yet completed SQL, and SQL Used 8 Two parallel processes :
SQL The code is as follows :
SELECT /*+ PARALLEL(a,8)*/ count(: "SYS_B_0")
FROM so1.ins_srv_attr_780 a
WHERE a.offer_inst_id IN
(
SELECT /*+parallel(b,8)*/ b.offer_inst_id
FROM so1.ins_offer_780 b
WHERE b.offer_type = : "SYS_B_1"
) AND
a.prod_srv_relat_id NOT IN
(
SELECT c.prod_srv_relat_id
FROM so1.ins_prod_ins_srv_780 c
);
SQL Contains a IN And a NOT IN, In the execution plan not in Of filter Inefficient steps , And this step also omits parallel hint( Not the main problem ). Why does the optimizer choose such an inefficient execution plan ?
The customer modified several implicit parameters :
OPT_PARAM('_optimizer_use_feedback' 'false')
OPT_PARAM('_optimizer_join_factorization' 'false')
OPT_PARAM('_optimizer_enable_density_improvements' 'false')
OPT_PARAM('_optimizer_adaptive_cursor_sharing' 'false')
OPT_PARAM('_optimizer_extended_cursor_sharing_rel' 'none')
OPT_PARAM('_bloom_pruning_enabled' 'false')
OPT_PARAM('_gby_hash_aggregation_enabled' 'false')
OPT_PARAM('_optimizer_join_elimination_enabled' 'false')
OPT_PARAM('_optimizer_extended_cursor_sharing' 'none')
OPT_PARAM('_bloom_filter_enabled' 'false')
OPT_PARAM('_optimizer_squ_bottomup' 'false')
After performing troubleshooting , Find the culprit _optimizer_squ_bottomup:
Let's see if this parameter is the default TRUE When SQL Implementation of ( Incidentally, the parallel writing problem has been corrected ):
SELECT /*+ PARALLEL(8) OPT_PARAM('_optimizer_squ_bottomup' 'true') */ count(1)
FROM so1.ins_srv_attr_780 a
WHERE a.offer_inst_id IN
(
SELECT b.offer_inst_id
FROM so1.ins_offer_780 b
WHERE b.offer_type = 'OFFER_PLAN_BBOSS'
) AND a.prod_srv_relat_id NOT IN
(
SELECT c.prod_srv_relat_id
FROM so1.ins_prod_ins_srv_780 c
);
See the following figure directly for the effect :
system parameter , In particular, implicit parameters , I haven't met bug Under the circumstances , Generally, modification is not recommended , This case is a very obvious lesson .
边栏推荐
- . Net 5.0 realizes the source code analysis of the oidc authentication part of single sign on through identityserver4
- 【ROS】ROSmsg cakin_make编译错误
- 大不列颠泰迪熊加入PUBG 手游
- Grafana report display of sentinel based high availability current limiting system
- In the middle of the year, we will promote the integration of worry free, and the value-added package will be reduced by 6
- 欧洲的龙之城|国家地理全球最浪漫最安全的目的地
- In 2022, the "product innovation and achievement transformation" training camp of Chaoyang District Science and technology innovation class was successfully completed
- 【ROS】ROSmsg cakin_ Make compilation error
- Uniapp applet mall develops thinkphp6 points mall, group purchase and seckill packaged app
- Implementation of breadth traversal adjacency matrix of 6-6 graph
猜你喜欢

SPA项目开发之动态树+数据表格+分页

The required reading for candidates | PMP the test on June 25 is approaching. What should we pay attention to?

June 25 PMI certification examination site epidemic prevention requirements and examination room arrangement

In 2022, the "product innovation and achievement transformation" training camp of Chaoyang District Science and technology innovation class was successfully completed

Kdd'22 | Ali: fine tuning CTR estimation based on EE exploration

Self service library system Tkinter interface and openpyxl form comprehensive design case

What are the indicators, dimensions and models in Business Intelligence BI data warehouse?
![Total number of combinations [standard backtracking + backtracking techniques -- reducing stack depth]](/img/88/3a07589bf8edab618139b1bf1680e8.png)
Total number of combinations [standard backtracking + backtracking techniques -- reducing stack depth]
![[ROS introduction] cmakelist Txt and packages XML interpretation](/img/37/24ce4be244ea56c2c84342492fccd4.png)
[ROS introduction] cmakelist Txt and packages XML interpretation

In a frame because it set 'X-FRAME-OPTIONS' to' deny '
随机推荐
CYCA少儿形体礼仪 深圳市培训成果考核圆满落幕
sitl_gazebo/include/gazebo_opticalflow_plugin.h:43:18: error: ‘TRUE’ was not declared in this scope
Self service library system Tkinter interface and openpyxl form comprehensive design case
[ROS introduction] cmakelist Txt and packages XML interpretation
Cryptography series: certificate format representation of PKI X.509
[GWCTF 2019]mypassword XSS
Dragon City in Europe | National Geographic the most romantic and safe destination in the world
腾讯云上传文件出现的问题:in a frame because it set ‘X-Frame-Options‘ to ‘deny‘.
立體渲染
Live broadcast forecast the sixth issue of the webinfo lecture hall of the China Information Association will be broadcast on June 24
Dynamic tree + data table + pagination of spa project development
MySQL functions
Shell (34): Time
sitl_ gazebo/include/gazebo_ opticalflow_ plugin. h:43:18: error: ‘TRUE’ was not declared in this scope
自助圖書館系統-Tkinter界面和openpyxl錶格綜合設計案例
Makefile:1860: recipe for target ‘cmake_check_build_system‘ failed make: *** [cmake_check_build_syst
322.零钱兑换
Lua -- iterator, module, meta table
Plan and change of continuous repair
June 25 PMI certification examination site epidemic prevention requirements and examination room arrangement