发明名称 EVALUATING SQL EXPRESSIONS ON DICTIONARY ENCODED VECTORS
摘要 Techniques are described herein for reducing the number of redundant evaluations that occur when an expression is evaluated against an encoded column vector by caching results of expression evaluations. When executing a query that includes an expression that references columns for which dictionary-encoded column vectors exist, the database server performs a cost-based analysis to determine which expressions (or sub-expressions) would benefit from caching the expression's evaluation result. For each such expression, the database server performs the necessary computations and caches the results for each of the possible distinct input values. When evaluating an expression for a row with a particular set of input codes, a look-up is performed based on the input code combination to retrieve the pre-computed results of that evaluation from the cache.
申请公布号 US2017116242(A1) 申请公布日期 2017.04.27
申请号 US201715397714 申请日期 2017.01.03
申请人 Oracle International Corporation 发明人 Chavan Shasank K.;Thomas Dina;Mylavarapu Ajit;Gaharwar Prashant;Lui Dennis;Lewis Sheldon A.K.
分类号 G06F17/30;G06F12/0875 主分类号 G06F17/30
代理机构 代理人
主权项 1. A method comprising: maintaining a table on persistent storage; wherein the table includes a first column; wherein the table has a particular row that includes a first value for the first column; based on a first dictionary, creating, in volatile memory, a dictionary-encoded column vector that contains codes that correspond to values from a range of rows of the first column; wherein the dictionary-encoded column vector stores a first code in a particular entry that corresponds to the particular row; receiving a query that includes a first expression that references the first column; creating in volatile memory, for the first expression, a first structure for cached-result lookups; evaluating the first expression for the first code by: using the first dictionary to determine that the first code corresponds to the first value; anddetermining a first result for the first expression by evaluating the first expression based, at least in part, on the first value; storing the first result in an entry in the first structure; during execution of the query, evaluating the first expression for the particular row by performing the steps of: reading the first code from the particular entry that corresponds to the particular row;using the first code to look up the entry in the first structure; andreading the first result from the entry; wherein the method is performed by one or more computing devices.
地址 Redwood Shores CA US