×

System and method for caching and parameterizing IR

  • US 10,339,137 B2
  • Filed: 12/07/2015
  • Issued: 07/02/2019
  • Est. Priority Date: 12/07/2015
  • Status: Active Grant
First Claim
Patent Images

1. A method comprising:

  • receiving, by a database, a first query;

    parsing, by the database, the first query to obtain a plan tree comprising a plurality of plan nodes arranged in hierarchical order descending from a top plan node;

    generating, by the database, first node intermediate representations (IRs) for the plan nodes;

    parameterizing, by the database, the first node IRs to replace one or more constants or tuple attributes in bodies of the first node IRs each with a respective parameter;

    combining, by the database, the parameterized first node IRs to obtain a first module for the first query;

    executing, by the database, the first query using the first module;

    receiving, by the database, a second query;

    generating, by the database, second node IRs for the second query;

    parameterizing, by the database, the second node IRs to replace one or more constants or tuple attributes in bodies of the second node IRs each with a respective parameter;

    matching, by the database, one or more of the parameterized first node IRs each with a corresponding one of the parameterized second node IRs, the matching parameterized first node IRs differing from the corresponding parameterized second node IRs in the respective parameters for each;

    reusing, by the database, the parameterized first node IRs to obtain a second module for the second query, the second module being compiled from the matching parameterized first node IRs and unmatched parameterized second node IRs; and

    executing, by the database, the second query using the second module.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×