×

System and method for efficient evaluation of a query that invokes a table valued function

  • US 7,606,792 B2
  • Filed: 06/30/2004
  • Issued: 10/20/2009
  • Est. Priority Date: 03/19/2004
  • Status: Expired due to Fees
First Claim
Patent Images

1. A method for processing a query that invokes a table valued function to provide results, the method comprising:

  • encoding by a computer processor at least one implicit argument in the table valued function, each of the at least one implicit argument passing instructions to execute at least one relational operation normally executed separately from the table valued function in the table valued function, wherein each relational operation is a filtering operation, a grouping operation or a projection operation, and a separate runtime implementation is generated for each relational operation;

    receiving a user defined class definition to instantiate a managed execution environment object;

    compiling the user defined class definition into binary code;

    storing the binary code at a database server;

    upon a request, querying the binary code to determine metadata regarding the user defined class, wherein the binary code may be interpreted by the database server based upon the managed execution environment object;

    receiving the query that invokes the table valued function;

    responsive to receiving the query, generating by a computer processor an information class that describes capabilities of the table valued function;

    querying by a computer processor the information class with a set of at least one binding questions regarding information about the table valued function comprising a number of columns that will be returned during query execution, types of columns, and/or names of the columns;

    querying by a computer processor the information class with a set of at least one optimization questions regarding information about the table valued function comprising whether rows are grouped on any set of columns, whether any columns make up a unique key, whether the table value function is deterministic or accesses external data sources and/or statistical information;

    executing by a computer processor the query in accordance with information provided in response to the set of binding questions and the set of optimization questions, wherein executing the query comprises;

    generating an execution class corresponding to the table valued function;

    requesting a set of data table rows as output from the execution class; and

    receiving the requested rows from the execution class.

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