研究和实践表明列存储更加适合于大规模数据集上的即席查询的"读优化"应用需求.然而由于列存储的处理对象是列,此时传统的基于规则的查询优化方法并不完全适用.文中首先比较了列存储系统中查询优化与行存储系统的不同,在此基础上提出适合于列存储的启发式查询优化机制,其中包括启发式优化策略、重写规则、左深连接树结构和相关算法.实验表明:该文提出的启发式优化机制能有效减少候选计划的规模,排除大量不可能生成最优计划的计划,使得查询处理代价和执行时间大大减小.
It is well known that column-store architecture is more suitable for "read optimization" application in large scale dataset.However,due to the fact that data is organized in columns in column-store,the traditional rule-based query optimization methods are not fully applicable for such application.In this paper,we first compare the difference of the query optimization between the column-sotre and row-store,and then propose a heuristic mechanism for query optimization in column-store,including heuristic optimization strategy,relational algebra expression rewriting rules,left-deep join tree and relating algorithms.The experimental results show that the proposed heuristic optimization mechanism can effectively reduce the size of the candidate plan,and exclude a large number of plans which can not generate the optimal plan,so as to make the cost and implementation time of query processing greatly reduced.