Method and apparatus for efficiently processing queries in a streaming transaction processing system
First Claim
1. A method for efficiently processing transactions in a streaming transaction processing system, wherein each transaction requires execution of a parameterized query having at least one input taken from that transaction against a relational database, the method comprising:
- (a) identifying Inputs and outputs of the parameterized query;
(b) creating a parameter table to hold the parameterized query inputs;
(c) converting the parameterized query into an equivalent query that contains a join against the parameter table;
(d) reading parameter values from transactions in the stream and populating the parameter table with input values read from the transactions, and(e) applying the equivalent query to the relational database to generate a result set; and
(f) inserting output values from the result set into the transactions.
2 Assignments
0 Petitions
Accused Products
Abstract
To efficiently process a parameterized query against a relational database in a streaming transaction processing system, the transaction stream is treated as a sequence of multi-record “chunks” and a single “quasi-batch” query is executed for each chunk. A specific table in the database holds the parameter values obtained from each transaction and the parameters are bound to the rest of the query by using a database join. Another embodiment uses a framework that automates the technique by accepting the parameterized query, identifying inputs and outputs, reading the stream for the parameter values and building the parameter table, converting the parameterized query into an equivalent query that contains a join against the parameter table, performing the equivalent query and inserting the resulting query values into the stream.
119 Citations
26 Claims
-
1. A method for efficiently processing transactions in a streaming transaction processing system, wherein each transaction requires execution of a parameterized query having at least one input taken from that transaction against a relational database, the method comprising:
-
(a) identifying Inputs and outputs of the parameterized query; (b) creating a parameter table to hold the parameterized query inputs; (c) converting the parameterized query into an equivalent query that contains a join against the parameter table; (d) reading parameter values from transactions in the stream and populating the parameter table with input values read from the transactions, and (e) applying the equivalent query to the relational database to generate a result set; and (f) inserting output values from the result set into the transactions. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. Apparatus for efficiently processing transactions in a streaming transaction processing system having a memory wherein each
transaction requires execution of a parameterized query having at least one input taken from that transaction against a relational database, the apparatus comprising: -
a mechanism that identifies inputs and outputs of the parameterized query; a table generator that creates a parameter table in the memory to hold the parameterized query inputs; a transformer that converts the parameterized query into an equivalent query that is in the memory and contains a join against the parameter table; a mechanism that reads parameter values from transactions in the stream and populates the parameter table with input values read from the transactions; and a mechanism that applies the equivalent query to the relational database to generate a result set; and a stream writer that inserts output values from the result set into the transactions. - View Dependent Claims (12, 13, 14, 15, 16, 17, 18, 19, 20)
-
-
21. Apparatus for efficiently processing transactions in a streaming transaction processing system having a memory wherein each transaction requires execution of a parameterized query having at least one input taken from that transaction against a relational database, the apparatus comprising:
-
means for Identifying Inputs and outputs of the parameterized query, means for creating a parameter table in the memory to hold the parameterized query inputs; means for converting the parameterized query into an equivalent query that is In the memory and contains a join against the parameter table; means for reading parameter values from transactions in the stream and populates the parameter table with input values read from the transactions; and means for applying the equivalent query to the relational database to generate a result set; and means for inserting output values from the result set Into the transactions. - View Dependent Claims (22, 23, 24)
-
-
25. A pipelined system for efficiently processing transactions in a streaming transaction processing system having a memory wherein each transaction requires execution of a parameterized query having at least one input taken from that transaction against a relational database, the system comprising:
-
a plurality of processing stages; a pipeline controller that determines the order of execution of the pipeline stages; wherein at least one pipeline stage includes; a mechanism that identifies inputs and outputs of the parameterized query; a table generator that creates a parameter table in the memory to hold the parameterized query inputs; a transformer that converts the parameterized query into an equivalent query that is in the memory and contains a join against the parameter table; a mechanism that reads parameter values from transactions in the stream and populates the parameter table with input values read from the transactions; a mechanism that applies the equivalent query to the relational database to generate a result set; and a mechanism that inserts output values from the result set into the transactions.
-
-
26. A computer program product for efficiently processing transactions in a streaming transaction processing system, wherein each transaction requires execution of a parameterized query having at least one input taken from that transaction against a relational database, the computer program product comprising a tangible computer usable medium having computer readable program code thereon, including:
-
program code for identifying inputs and outputs of the parameterized query; program code for creating a parameter table to hold the parameterized query inputs; program code for converting the parameterized query into an equivalent query that contains a join against the parameter table; program code for reading parameter values from transactions in the stream and populates the parameter table with input values read from the transactions; program code for applying the equivalent query to the relational database to generate a result set; and program code for inserting output values from the result set into the transactions.
-
Specification