摘要:
A technique for retrieving from a database system data stored in one or more tables is useful in performing cost based query rewrite on user database queries. The technique involves receiving a database query having at least two input relations and evaluating the domain size of the join column(s) of at least one of the input relations. If the domain size of the join column(s) of at least one evaluated input relation is relatively small, the method replaces the input relation(s) in the query with one or more constant expressions. The method also includes evaluating the query and delivering the selected data to the user.
摘要:
A method, apparatus, and article of manufacture for optimizing SQL queries in a relational database management system involving aggregate and grouping functions. A local aggregation operation is performed on one or more processors of a massively parallel processor (MPP) computer system, wherein rows of the table that are local to each processor are locally aggregated to create one or more aggregate result rows. The aggregate result rows created by each of the local aggregation operations are then re-distributed to one or more processors and coalesced into a global aggregate result row by a global aggregation operation.