OPTIMIZATION TECHNIQUES FOR LINEAR RECURSIVE QUERIES IN SQL
First Claim
1. A method of evaluating an SQL recursive query having one or more base select statements and one or more recursive select statements, the query relating to a base table and having a filter condition on one or more columns from a result table returned by the query, the method comprising:
- receiving the query to be evaluated;
evaluating a base step by evaluating one or more of the base select statements;
evaluating one or more recursive steps by evaluating one or more of the recursive select statements;
evaluating the filter condition prior to evaluating any of the recursive steps; and
returning the result of the query.
2 Assignments
0 Petitions
Accused Products
Abstract
A system and method of evaluating an SQL recursive query having one or more base select statements and one or more recursive select statements. In one technique the query relates to a base table and has a filter condition on one or more columns from a result table returned by the query. The technique includes the steps of receiving the query to be evaluated, evaluating a base step by evaluating one or more of the base select statements, evaluating one or more recursive steps by evaluating one or more of the recursive select statements, evaluating the filter condition prior to evaluating any of the recursive steps, and returning the result of the query.
-
Citations
42 Claims
-
1. A method of evaluating an SQL recursive query having one or more base select statements and one or more recursive select statements, the query relating to a base table and having a filter condition on one or more columns from a result table returned by the query, the method comprising:
-
receiving the query to be evaluated;
evaluating a base step by evaluating one or more of the base select statements;
evaluating one or more recursive steps by evaluating one or more of the recursive select statements;
evaluating the filter condition prior to evaluating any of the recursive steps; and
returning the result of the query. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A method of evaluating an SQL recursive query having one or more base select statements and one or more recursive select statements, the query relating to a base table, the method comprising:
-
receiving the query to be evaluated;
evaluating a base step by evaluating one or more of the base select statements to create a result table;
deleting duplicate rows from the result table;
evaluating one or more recursive steps by evaluating one or more of the recursive select statements; and
returning the result of the query. - View Dependent Claims (13, 14, 15, 16, 17)
-
-
18. A method of evaluating an SQL recursive query having one or more base select statements and one or more recursive select statements, the query relating to a base table and having an aggregate function on one or more columns from a result table returned by the query, the method comprising:
-
receiving the query to be evaluated;
evaluating a base step by evaluating one or more of the base select statements;
evaluating one or more recursive steps by evaluating one or more of the recursive select statements;
evaluating the aggregate function prior to evaluating any of the recursive steps; and
returning the result of the query. - View Dependent Claims (19, 20, 21, 22, 23, 24)
-
-
25. A method of evaluating an SQL recursive query having one or more base select statements and one or more recursive select statements, the query relating to a base table and having a join operation between a result table returned by the query and a further table, the method comprising:
-
receiving the query to be evaluated;
evaluating a base step by evaluating one or more of the base select statements;
evaluating one or more recursive steps by evaluating one or more of the recursive select statements;
evaluating the join operation; and
returning the result of the query. - View Dependent Claims (26, 27, 28)
-
-
29. A method of evaluating an SQL recursive query having one or more base select statements and one or more recursive select statements, the query relating to a base table, and having a join operation, the method comprising:
-
receiving the query to be evaluated;
defining at least one index for the base table, and defining at least one index for a result table returned by the query;
evaluating the join operation; and
returning the result of the query. - View Dependent Claims (30, 31, 32)
-
-
33. A system for evaluating an SQL recursive query having one or base select statements and one or more recursive select statements, the query relating to a base table and having a filter condition on one or more columns from a result table returned by the query, where the system is configured to:
-
receive the query to be evaluated;
evaluate a base step by evaluating one or more of the base select statements;
evaluate one or more recursive steps by evaluating one or more of the recursive select statements;
evaluate the filter condition prior evaluating any of the recursive steps; and
return the result of the query.
-
-
34. A system for evaluating an SQL recursive query having one or more base select statements and one or more recursive select statements, the query relating to a base table, where the system is configured to:
-
receive the query to be evaluated;
evaluate a base step by evaluating one or more of the base select statements to create a result table;
delete duplicate rows from the result table;
evaluate one or more recursive steps by evaluating one or more of the recursive select statements; and
return the result of the query.
-
-
35. A system for evaluating an SQL recursive query having one or more base select statements and one or more recursive select statements, the query relating to a base table and having an aggregate function on one or more columns from a result table returned by the query, where the system is configured to:
-
receive the query to be evaluated;
evaluate a base step by evaluating one or more of the base select statements;
evaluate one or more recursive steps by evaluating one or more of the recursive select statements;
evaluate the aggregate function prior to evaluating any of the recursive steps; and
return the result of the query.
-
-
36. A system for evaluating an SQL recursive query having one or more base select statements one or more recursive select statements, the query relating to a base table and having a join operation between a result table returned by the query and a further table, where the system is configured to:
-
receive the query to be evaluated;
evaluate a base step by evaluating one or more of the base select statements;
evaluate one or more recursive steps by evaluating one or more of the recursive select statements;
evaluate the join operation; and
return the result of the query.
-
-
37. A system for evaluating an SQL recursive query having one or more base select statements and one or more recursive select statements, the query relating to a base table, and having a join operation, where the system is configured to:
-
receive the query to be evaluated;
define at least one index for the base table, and define at least one index for a result table returned by the query;
evaluate the join operation; and
return the result of the query.
-
-
38. A computer program stored on tangible storage media comprising executable instructions for performing a method of evaluating an SQL recursive query having one or more base select statements and one or more recursive select statements, the query relating to a base table and having a filter condition on one or more columns from a result table returned by the query, the method comprising:
-
receiving the query to be evaluated;
evaluating a base step by evaluating one or more of the base select statements;
evaluating one or more recursive steps by evaluating one or more of the recursive select statements;
evaluating the filter condition prior to evaluating any of the recursive steps; and
returning the result of the query.
-
-
39. A computer program stored on tangible storage media comprising executable instructions for performing a method of evaluating an SQL recursive query having one or more base select statements and one or more recursive select statements, the query relating to a base table, the method comprising:
-
receiving the query to be evaluated;
evaluating a base step by evaluating one or more of the base select statements to create a result table;
deleting duplicate rows from the result table;
evaluating one or more recursive steps by evaluating one or more of the recursive select statements; and
returning the result of the query.
-
-
40. A computer program stored on tangible storage media comprising executable instructions for performing a method of evaluating an SQL recursive query having one or more base select statements and one or more recursive select statements, the query relating to a base table and having an aggregate function on one or more columns from a result table returned by the query, the method comprising:
-
receiving the query to be evaluated;
evaluating a base step by evaluating one or more of the base select statements;
evaluating one or more recursive steps by evaluating one or more of the recursive select statements;
evaluating the aggregate function prior to evaluating any of the recursive steps; and
returning the result of the query.
-
-
41. A computer program stored on tangible storage media comprising executable instructions for performing a method of evaluating an SQL recursive query having one or more base select statements and one or more recursive select statements, the query relating to a base table and having a join operation between a result table returned by the query and a further table, the method comprising:
-
receiving the query to be evaluated;
evaluating a base step by evaluating one or more of the base select statements;
evaluating one or more recursive steps by evaluating one or more of the recursive select statements;
evaluating the join operation; and
returning the result of the query.
-
-
42. A computer program stored on tangible storage media comprising executable instructions for performing a method of evaluating an SQL recursive query having one or more base select statements and one or more recursive select statements, the query relating to a base table, and having a join operation, the method comprising:
-
receiving the query to be evaluated;
defining at least one index for the base table, and defining at least one index for a result table returned by the query;
evaluating the join operation; and
returning the result of the query.
-
Specification