Querying a database
Abstract
A query is received from a user. A query event type and a query time range associated with the query are determined. An estimated amount of data to be queried associated with the determined query time range is determined based on at least a historical number of the query event type of the user. An allowable amount of data to be queried supported by a database for a single query is determined. One or more sub-queries for the received query are generated. Each sub-query is associated with a different time period within the determined query time range. A corresponding amount of data to be queried associated with each time period is less than, or equal to, the determined allowable amount of data to be queried. The database is queried with the generated one or more sub-queries.
Claims
exact text as granted — not AI-modified1 .- 20 . (canceled)
21 . A computer-implemented method, comprising:
receiving, as a received query, a query from a user; determining a query event type and a query time range associated with the query; determining an estimated amount of data to be queried associated with the query time range based on at least a historical number of the query event type of the user; determining an allowable amount of data to be queried supported by a database for a single query; determining, based on the estimated amount of data to be queried and the allowable amount of data to be queried, a quantity N of one or more sub-queries to be generated; dividing the query time range into N time periods, wherein N−1 time periods of the N time periods have equal lengths of time; generating, as generated one or more sub-queries, the quantity N of one or more sub-queries for the received query, wherein each sub-query is used to query data in a different time period of the N time periods, and wherein a corresponding amount of data to be queried associated with each time period is less than, or equal to, the allowable amount of data to be queried; and querying the database with the generated one or more sub-queries.
22 . The computer-implemented method of claim 21 , wherein the historical number of the query event type of the user is an average number of the query event type of the user in a fixed time period or a maximum number of the query event type of the user in the fixed time period.
23 . The computer-implemented method of claim 21 , wherein determining the estimated amount of data to be queried comprises:
determining whether the historical number of the query event type of the user is greater than, or equal to, a first predefined threshold and is less than, or equal to, a second predefined threshold; and in response to determining that the historical number of the query event type of the user is greater than, or equal to, the first predefined threshold and is less than, or equal to, the second predefined threshold, determining the estimated amount of data to be queried associated with the query time range.
24 . The computer-implemented method of claim 23 , further comprising:
determining that the historical number of the query event type of the user is less than the first predefined threshold; and in response to determining that the historical number of the query event type of the user is less than the first predefined threshold, generating one or more additional sub-queries for the received query based on a predefined duration.
25 . The computer-implemented method of claim 23 , further comprising:
determining that the historical number of the query event type of the user is greater than the second predefined threshold; and in response to determining that the historical number of the query event type of the user is greater than the second predefined threshold, performing a delayed querying process for the received query.
26 . The computer-implemented method of claim 25 , wherein performing the delayed querying process for the received query comprises querying a backup database associated with the database.
27 . The computer-implemented method of claim 25 , wherein performing the delayed querying process for the received query comprises setting a delayed response identifier for the query.
28 . A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations comprising:
receiving, as a received query, a query from a user; determining a query event type and a query time range associated with the query; determining an estimated amount of data to be queried associated with the query time range based on at least a historical number of the query event type of the user; determining an allowable amount of data to be queried supported by a database for a single query; determining, based on the estimated amount of data to be queried and the allowable amount of data to be queried, a quantity N of one or more sub-queries to be generated; dividing the query time range into N time periods, wherein N−1 time periods of the N time periods have equal lengths of time; generating, as generated one or more sub-queries, the quantity N of one or more sub-queries for the received query, wherein each sub-query is used to query data in a different time period of the N time periods, and wherein a corresponding amount of data to be queried associated with each time period is less than, or equal to, the allowable amount of data to be queried; and querying the database with the generated one or more sub-queries.
29 . The non-transitory, computer-readable medium of claim 28 , wherein the historical number of the query event type of the user is an average number of the query event type of the user in a fixed time period or a maximum number of the query event type of the user in the fixed time period.
30 . The non-transitory, computer-readable medium of claim 28 , wherein determining the estimated amount of data to be queried comprises:
determining whether the historical number of the query event type of the user is greater than, or equal to, a first predefined threshold and is less than, or equal to, a second predefined threshold; and in response to determining that the historical number of the query event type of the user is greater than, or equal to, the first predefined threshold and is less than, or equal to, the second predefined threshold, determining the estimated amount of data to be queried associated with the query time range.
31 . The non-transitory, computer-readable medium of claim 30 , the operations further comprising:
determining that the historical number of the query event type of the user is less than the first predefined threshold; and in response to determining that the historical number of the query event type of the user is less than the first predefined threshold, generating one or more additional sub-queries for the received query based on a predefined duration.
32 . The non-transitory, computer-readable medium of claim 30 , the operations further comprising:
determining that the historical number of the query event type of the user is greater than the second predefined threshold; and in response to determining that the historical number of the query event type of the user is greater than the second predefined threshold, performing a delayed querying process for the received query.
33 . The non-transitory, computer-readable medium of claim 32 , wherein performing the delayed querying process for the received query comprises querying a backup database associated with the database.
34 . The non-transitory, computer-readable medium of claim 32 , wherein performing the delayed querying process for the received query comprises setting a delayed response identifier for the query.
35 . A computer-implemented system, comprising:
one or more computers; and one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform one or more operations comprising:
receiving, as a received query, a query from a user;
determining a query event type and a query time range associated with the query;
determining an estimated amount of data to be queried associated with the query time range based on at least a historical number of the query event type of the user;
determining an allowable amount of data to be queried supported by a database for a single query;
determining, based on the estimated amount of data to be queried and the allowable amount of data to be queried, a quantity N of one or more sub-queries to be generated;
dividing the query time range into N time periods, wherein N−1 time periods of the N time periods have equal lengths of time;
generating, as generated one or more sub-queries, the quantity N of one or more sub-queries for the received query, wherein each sub-query is used to query data in a different time period of the N time periods, and wherein a corresponding amount of data to be queried associated with each time period is less than, or equal to, the allowable amount of data to be queried; and
querying the database with the generated one or more sub-queries.
36 . The computer-implemented system of claim 35 , wherein the historical number of the query event type of the user is an average number of the query event type of the user in a fixed time period or a maximum number of the query event type of the user in the fixed time period.
37 . The computer-implemented system of claim 35 , wherein determining the estimated amount of data to be queried comprises:
determining whether the historical number of the query event type of the user is greater than, or equal to, a first predefined threshold and is less than, or equal to, a second predefined threshold; and in response to determining that the historical number of the query event type of the user is greater than, or equal to, the first predefined threshold and is less than, or equal to, the second predefined threshold, determining the estimated amount of data to be queried associated with the query time range.
38 . The computer-implemented system of claim 37 , the operations further comprising:
determining that the historical number of the query event type of the user is less than the first predefined threshold; and in response to determining that the historical number of the query event type of the user is less than the first predefined threshold, generating one or more additional sub-queries for the received query based on a predefined duration.
39 . The computer-implemented system of claim 37 , the operations further comprising:
determining that the historical number of the query event type of the user is greater than the second predefined threshold; and in response to determining that the historical number of the query event type of the user is greater than the second predefined threshold, performing a delayed querying process for the received query.
40 . The computer-implemented system of claim 39 , wherein performing the delayed querying process for the received query comprises querying a backup database associated with the database.Join the waitlist — get patent alerts
Track US2022050842A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.