×

Optimizing database queries using subquery composition

  • US 9,183,254 B1
  • Filed: 03/13/2013
  • Issued: 11/10/2015
  • Est. Priority Date: 05/04/2012
  • Status: Active Grant
First Claim
Patent Images

1. A computer implemented method for optimizing database queries, the method comprising:

  • receiving, by a database system, a request to optimize a database query;

    identifying an inner subquery and an outer subquery in the database query, the inner subquery nested within the outer subquery;

    identifying a first set of columns such that the inner subquery performs a group by based on the first set of columns;

    identifying a second set of columns such that the outer subquery performs a group by based on the second set of columns;

    determining that the second set of columns is a subset of the first set of columns;

    determining whether a result of the inner subquery is provided as an input to the outer subquery;

    generating a combined database query corresponding to a composition of the outer subquery and the inner subquery if the result of the inner subquery is determined to be an input to the outer subquery and the second set of columns is determined to be a subset of the first set of columns; and

    storing the combined database query.

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