Compilation and Optimization of SQL Query Statements on Column-oriented Database

) ) )A column-oriented database based on a heterogeneous platform of multi-core CPU and GPU can be used for mass data and complex queries. However, the optimization in this database is mainly on physical level and execution sequence for its back-end can only be generated manually, resulting in hard adaptation to varieties of SQL query statements. To solve this problem, this paper designs and implements a compiler that translates SQL query statements into execution sequence. It studies Common Subexpression Elimination(CSE) method in multiple complex expressions and merging method of multiple primitive dependency graphs. Comparing the results with situations where no compiler is used in GSQL, it can be found that this compiler can improve speed of computing multiple complex expressions efficiently and reduce time of processing multiple SQL query statements.