Envisioning Next Generation Optimizer MBO:MachineLearning Based Optimizer

 

2016-06-10  Zhu Jie  hadoop technology learning


 

Those who are familiar with the ORACLE database must be familiar with RBO/CBO.

 

Rule Based Optimizer (RBO) based on rules
Cost Based Optimizer (CBO) based on cost, or statistics

 

ORACLE provides two SQL optimizers, CBO and RBO. CBO was introduced in ORACLE7, but matured in ORACLE8i. ORACLE has clearly stated that in versions after ORACLE9i (ORACLE 10G), RBO will no longer be supported. Therefore, the choice of CBO is an inevitable trend.

 

RBO has been adopted since ORACLE version 6 and has a set of strict usage rules. As long as you follow it to write SQL statements, no matter what the content of the data table is, it will not affect your "execution plan". Data is not "sensitive"; CBO calculates the "cost" of various possible "execution plans", that is, cost, and selects the plan with the lowest cost as the actual operation plan. The calculation basis of the cost of each "execution plan" depends on the statistical distribution of the data in the data table. The ORACLE database itself is not clear about the statistical distribution. It is necessary to analyze the table and related indexes (using the ANALYZE command) to collect CBOs. required data.

 

RBO is a rigid, outdated optimizer that only recognizes rules and is insensitive to data. After all, the rules are dead and the data is changing. The execution plan generated in this way is often unreliable and not optimal. Compared with RBO, CBO has made great progress.

 

CBO/RBO is evolved from transaction data. CBO can only count static data, such as ETL calculation in the field of analysis, and there are many external conditions, such as the relationship between data volume and resources, and the interaction between tasks , high SLA task guarantee, etc. These problems that cannot be solved by static statistics can be solved by machine learning algorithms, so I am thinking that the future optimizer should be MBO: MachineLearning Based Optimizer.

 

What do you think?

 

 
 

WeChat scan and
follow the public account

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326801142&siteId=291194637