×

JOIN TYPE FOR OPTIMIZING DATABASE QUERIES

  • US 20150142775A1
  • Filed: 01/27/2015
  • Published: 05/21/2015
  • Est. Priority Date: 10/10/2012
  • Status: Active Grant
First Claim
Patent Images

1. A method for optimizing database queries in a query compiler, comprising:

  • searching a subquery within a query;

    analyzing the searched subquery to identify a candidate of a scalar subquery;

    analyzing the candidate scalar subquery to identify a candidate of a correlated scalar subquery; and

    transforming the query having the candidate correlated scalar subquery into a query of a quasi-JOIN depending on a result type of the candidate correlated scalar subquery,wherein the quasi-JOIN is a join to process grouping and aggregation, in which Group by Aggregation and Join that is a lower node of the Group by Aggregation are merged together and the quasi-JOIN includes a first aggregation join in which join keys and group keys do not match each other and a second aggregation join in which join keys and group keys match each other; and

    the first aggregation join creates a result in which the group keys are partially grouped and subjected to Aggregation when the join keys and the groups have a matching condition, wherein the results for the rows with the group keys that are duplicated are grouped at a Group by Aggregation that is an upper node;

    the second aggregation join returns a result in which the group keys are grouped and subjected to Aggregation when the join keys and the groups have a matching condition.

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