Queries with soft time constraints
First Claim
Patent Images
1. A system, comprising:
- a non-transitory computer-readable medium storing instructions configured as receive logic to receive a first query having a soft time constraint and an acceptable nature of results constraint that specifies one of, whether a partial result is to be returned, and whether an approximate result is to be returned;
an analytics logic to provide a predicted execution time for a query based, at least in part, on the acceptable nature of results constraint; and
a constraint rewrite logic to selectively produce a rewritten query based on the first query, the rewritten query having a restricted result clause, where the restricted result clause depends, at least in part, on the predicted execution time and specifies one of, a number of rows to which row selection is to be limited by the rewritten query, and a sample percentage to which row selection is to be limited by the rewritten query.
1 Assignment
0 Petitions
Accused Products
Abstract
Systems, methodologies, media, and other embodiments associated with supporting queries with soft time constraints are described. One exemplary system embodiment includes logic for accepting a query having a soft time constraint. The example system may also include logic for rewriting the query having the soft time constraint into a query having a row limitation or a sample percentage limitation. In one example, the row limitation or sample percentage limitation are computed by repetitively comparing an estimated query execution time to the soft time constraint.
79 Citations
30 Claims
-
1. A system, comprising:
-
a non-transitory computer-readable medium storing instructions configured as receive logic to receive a first query having a soft time constraint and an acceptable nature of results constraint that specifies one of, whether a partial result is to be returned, and whether an approximate result is to be returned; an analytics logic to provide a predicted execution time for a query based, at least in part, on the acceptable nature of results constraint; and a constraint rewrite logic to selectively produce a rewritten query based on the first query, the rewritten query having a restricted result clause, where the restricted result clause depends, at least in part, on the predicted execution time and specifies one of, a number of rows to which row selection is to be limited by the rewritten query, and a sample percentage to which row selection is to be limited by the rewritten query. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24)
-
-
25. A non-transitory computer-readable medium storing processor executable instructions that when executed by a computer cause the computer to perform a method, the method comprising:
-
receiving a first select statement having a soft time constraint clause, the select statement describing a desired selection of one or more rows from a set of tables; determining an execution time estimate for the first select statement; selecting from the set of tables a subset of tables from which row selection is to be limited, where the subset of tables is selected based, at least in part, on the soft time constraint clause and the execution time estimate; selecting a method by which row selection from a member of the subset of tables is to be limited, where the method selected is based, at least in part, on the soft time constraint clause and the execution time estimate; selecting an amount by which row selection from a member of the subset of tables is to be limited, where the amount selected is based, at least in part, on the soft time constraint clause and the execution time estimate; providing a second select statement having at least one additional clause to limit selection of rows from a member of the subset of tables by the selected amount according to the selected method, the second select statement being based on the first select statement; selecting an initial number of rows to which row selection will be limited based on a comparison of the initial estimate and the soft time constraint; and iteratively selecting and analyzing a subsequent number of rows to which row selection will be limited until a time estimate falls within a threshold amount of the soft time constraint, the subsequent number of rows being based on a previous number of rows, a time estimate associated with a previous number of rows, and the soft time constraint. - View Dependent Claims (26)
-
-
27. A non-transitory computer-readable medium storing processor executable instructions that when executed by a processor cause the processor to perform a method, the method comprising:
-
receiving a first select statement having a soft time constraint clause, the select statement describing a desired selection of one or more rows from a set of tables; determining an execution time estimate for the first select statement; selecting from the set of tables a subset of tables from which row selection is to be limited, where the subset of tables is selected based, at least in part, on the soft time constraint clause and the execution time estimate; selecting a method by which row selection from a member of the subset of tables is to be limited, where the method selected is based, at least in part, on the soft time constraint clause and the execution time estimate; selecting an amount by which row selection from a member of the subset of tables is to be limited, where the amount selected is based, at least in part, on the soft time constraint clause and the execution time estimate; providing a second select statement having at least one additional clause to limit selection of rows from a member of the subset of tables by the selected amount according to the selected method, the second select statement being based on the first select statement; selecting an initial sample percentage to which row selection will be limited for a member of the subset of tables based on a comparison of the initial estimate and the soft time constraint; and iteratively selecting and analyzing a subsequent sample percentage to which row selection will be limited for a member of the subset of tables until a time estimate falls within a threshold amount of the soft time constraint, the subsequent sample percentage being based on a previous sample percentage, a time estimate associated with a previous sample percentage, and the soft time constraint.
-
-
28. A system, comprising:
-
means for computing a predicted execution time for a query having a soft time constraint and an acceptable nature of results constraint that specifies one of, whether a partial result is to be returned, and whether an approximate result is to be returned; and means for rewriting the query based, at least in part, on the predicted execution time and the soft time constraint, where the rewriting includes replacing the soft time constraint with a result set limitation clause that specifies one of, a number of rows to which row selection is to be limited, and a sample percentage to which row selection is to be limited. - View Dependent Claims (29)
-
-
30. A non-transitory computer-readable medium storing computer executable instructions that when executed by a computer cause the computer to perform a method, the method, comprising:
-
computing a predicted execution time for a query having a soft time constraint and an acceptable nature of results constraint that specifies one of, whether a partial result is to be returned, and whether an approximate result is to be returned; and rewriting the query based, at least in part, on the predicted execution time and the soft time constraint, where the rewriting includes replacing the soft time constraint with a result set limitation clause that specifies one of, a number of rows to which row selection is to be limited, and a sample percentage to which row selection is to be limited.
-
Specification