×

Automatically and adaptively determining execution plans for queries with parameter markers

  • US 7,958,113 B2
  • Filed: 05/22/2008
  • Issued: 06/07/2011
  • Est. Priority Date: 02/09/2007
  • Status: Expired due to Fees
First Claim
Patent Images

1. A computer-based method of automatically and adaptively determining query execution plans for queries having parameter markers, said method comprising:

  • generating, by a computing system, a first classifier trained by an initial set of training points;

    dynamically updating, by a computing system at a first runtime thereof, at least one of a workload of queries processed by a database of said computing system and database statistics collected by said database for computing a plurality of selectivities;

    collecting, by a computing system in an off-line phase thereof, said off-line phase being subsequent to said first runtime, a new set of training points, said collecting responsive to a detection of said dynamically updating;

    modifying, by said computing system in said off-line phase, said first classifier into a second classifier, said modifying including utilizing said new set of training points;

    receiving, by said computing system at a second runtime thereof, said second runtime being subsequent to said off-line phase, a query for said database, said query including one or more predicates, each predicate including one or more parameter markers bound to one or more actual values, and said one or more predicates associated with one or more selectivities of said plurality of selectivities in a one-to-one correspondence; and

    automatically determining a query execution plan by said computing system, said automatically determining including mapping, by said second classifier, said one or more selectivities into said query execution plan, wherein said query execution plan is included in an augmented set of training points, said augmented set including said initial set and said new set,wherein said generating said first classifier comprises utilizing a machine learning technique, wherein said modifying said first classifier into said second classifier includes maintaining said first classifier incrementally, wherein said machine learning technique is a boosting technique, and wherein said method further comprises;

    determining a subset of training points of said initial set of training points, said subset of training points belonging to a plurality of classes, each class having less than a predetermined threshold coverage of said initial set of training points;

    assigning training points of said subset of training points to a single unclassified class;

    setting a number of classes to k, wherein k is one plus a number of classes having greater than said predetermined threshold coverage;

    generating an error-correcting output code (ECOC) table of length 2*k;

    training a binary classifier as said first classifier, said training including utilizing AdaBoost with confidence-rated predictions for each column in said ECOC table, said training said binary classifier including;

    initializing said augmented set of training points with equal weights; and

    performing a training procedure for T rounds, each round of said training procedure comprising;

    training a plurality of weak learners on said augmented set of training points,choosing a weak learner of said plurality of weak learners, said weak learner having a lowest training error of a plurality of training errors associated with said plurality of weak learners in a one-to-one correspondence,assigning a weight to said weak learner, said weight being a function of said lowest training error,assigning exponentially higher weight to any misclassified training points of said augmented set of training points, andassigning exponentially lower weight to any correctly classified training points of said augmented set of training points; and

    said training said binary classifier further including;

    outputting a model including T weak learners and T weights, said T weights associated with said T weak learners in a one-to-one correspondence, each weak learner of said T weak learners chosen by said choosing said weak learner in each round of said T rounds, and each weight of said T weights assigned by said assigning said weight in each round of said T rounds.

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