×

Use of statistics on views in query optimization

  • US 7,509,311 B2
  • Filed: 08/29/2003
  • Issued: 03/24/2009
  • Est. Priority Date: 08/29/2003
  • Status: Expired due to Fees
First Claim
Patent Images

1. A computer-implemented method for performing query optimization comprising:

  • developing at least one candidate plan for execution of a query;

    receiving a user request to collect a view statistic of a view for at least one of said at least one candidate plan, the user request comprising a completeness level, the completeness level indicating a sampling of data from the view, as selected by the user, that is to be used in collecting the view statistic;

    collecting the view statistic responsive to the user request and the completeness level;

    for said at least one of said at least one candidate plan, using the view statistic to estimate the cost of said candidate plan; and

    selecting at least one of said at least one candidate plans as a recommended execution plan,wherein said step of using the view statistic to estimate the cost of said candidate plan comprises using at least one transformation rule to transform a first expression comprising all or part of said candidate plan and having an associated first expression estimate quality indicator into an equivalent second expression having an associated second expression estimate quality indicator, where said second expression comprises a reference to one or more views matching the first expression, and wherein said second expression and said first expression have an equivalent cardinality; and

    wherein the step of selecting the recommended execution plan comprises one of the first expression and the second expression having the higher of the first expression estimate quality indicator and the second expression estimate quality indicator.

View all claims
  • 2 Assignments
Timeline View
Assignment View
    ×
    ×