摘要 |
A small-footprint relational database system providing a deterministic join enumeration methodology for left-deep processing trees is described. By providing a deterministic branch-and-bound join enumeration method for left-deep processing trees, the invention is able to efficiently optimize complex queries with high join degree by employing a novel approach to cost-based pruning of the search space. For each subquery, plan generation involves the following four distinct steps. First, the system adjusts predicate selectivities to account for disjuncts, Between predicates, and user estimates of selectivities. Next, the system constructs a join graph for the query that models inner and outer equijoin predicates, sargable single-variable predicates on single quantifiers, and Cartesian products. The system then enumerates join strategies and prune the search space using a branch-and-bound heuristic. Finally, the system recalls the cheapest strategy and constructs the detailed access plan for that strategy. Empirical performance results on several production queries show that this approach requires significantly less memory than other deterministic join enumeration approaches, which have been described in the literature.
|