发明名称 Exploiting partitioning, grouping, and sorting in query optimization
摘要 An optimizer uses comprehensive reasoning regarding partitioning, sorting, and grouping properties for query optimization. When optimizing an input query expression, logical exploration generates alternative logical expressions. Physical optimization explores physical operator alternatives for logical operators. Required partitioning, sorting, and grouping properties of inputs to physical operators are determined. Additionally, delivered partitioning, sorting, and grouping properties of outputs from physical operators are determined. In some embodiments, enforcer rules are employed to modify structural property requirements to introduce alternatives for consideration. Property matching identifies valid execution plans in which the delivered partitioning, sorting, and grouping properties satisfy corresponding required partitioning, sorting, and grouping properties. An execution plan having the lowest cost is selected as the optimized execution plan.
申请公布号 US8745037(B2) 申请公布日期 2014.06.03
申请号 US20090640829 申请日期 2009.12.17
申请人 Microsoft Corporation 发明人 Zhou Jingren;Larson Pre-Ake;Chaiken Ronnie Ira
分类号 G06F17/30 主分类号 G06F17/30
代理机构 代理人
主权项 1. One or more hardware memory devices, not being a signal per se, storing computer-useable instructions that, when used by one or more computing devices, cause the one or more computing devices to perform a method comprising: receiving an input query expression and a set of one or more physical property requirements, the input query expression being represented as an operator tree comprising a plurality of logical operators; performing logical exploration by applying transformation rules to generate a plurality of logical query expressions with varying logical operators; performing physical optimization for each logical query expression by applying implementation rules to convert logical operators to physical operators wherein physical optimization comprises: for each physical operator considered for each logical operator, determining delivered structural properties output by the physical operator, the delivered structural properties including a partitioning property, a sorting property, and a grouping property, each defining a partition, sort, and group structure, respectively, of output data delivered from the physical operator; for each physical operator considered for each logical operator, determining required structural properties as input for the physical operator, the required structural properties including a partitioning property, a sorting property, and a grouping property, each defining a partition, sort, and group structure, respectively, of input data required for the physical operator; determining whether delivered structural properties satisfy corresponding required structural properties, wherein determining whether delivered structural properties satisfy corresponding required structural properties comprises: (a) determining whether delivered partitioning properties satisfy required partitioning properties; (b) determining whether delivered sorting properties satisfy required sorting properties; and (c) determining whether delivered grouping properties satisfy required grouping properties; identifying valid execution plans in which delivered structural properties satisfy required structural properties; estimating costs associated with each of the valid execution plans; and selecting, from the valid execution plans, an execution plan having a lowest cost as an optimized execution plan.
地址 Redmond WA US