Query request processing method and apparatus for time series database
A query request and database technology, applied in the database field, can solve the problems of reducing system processing efficiency, prolonging the overall waiting time of the system, waiting in line, etc., and achieve the effect of improving processing efficiency, reducing overall waiting time, and avoiding impact
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0068] figure 1 It is a flow chart of an embodiment of the query request processing method of the time series database described in the present invention, such as figure 1 As shown, including the following specific implementation methods:
[0069] In 11, when receiving the user's query request, determine the query type of the query request, the query type includes: fast query and slow query;
[0070] In 12, if it is a fast query, the query request is added to the queue of the first thread pool; if it is a slow query, the query request is added to the queue of the second thread pool.
[0071] To isolate fast queries and slow queries, it is mainly implemented by placing fast queries and slow queries in different thread pools. Both thread pools have their own queues, and query requests will only be processed in the thread pool to which they belong. Queue in the queue, therefore, the slow query will not affect the fast query, that is, the slow query will not block the fast query...
Embodiment 2
[0104] Based on the above introduction, figure 2 It is a flowchart of a preferred embodiment of the query request processing method of the time series database described in the present invention, such as figure 2 As shown, the following specific implementation methods are included.
[0105] In 21, a query request from a user is received.
[0106] In step 22, the query time range is calculated according to the start time and end time of the query data carried in the query request.
[0107] Query time range = end time - start time.
[0108] In 23, the table writing frequency of the table to be queried carried in the query request within the latest predetermined time period is obtained.
[0109] In step 24, it is determined whether the query request further carries a filter condition, if not, execute step 25, and if yes, execute step 26.
[0110] That is to say, the received query request will carry the following information:
[0111] 1) The table to be queried;
[0112] ...
Embodiment 3
[0127] image 3 It is a schematic diagram of the composition and structure of the embodiment of the query request processing device of the time series database according to the present invention, as shown in image 3 As shown, it includes: a receiving unit 31 , a processing unit 32 and a distribution unit 33 .
[0128] The receiving unit 31 is configured to receive a query request from a user, and send the query request to the processing unit 32 and the distribution unit 33 .
[0129] The processing unit 32 is configured to determine the query type of the query request, the query types include: fast query and slow query, and send the determination result to the distribution unit 33 .
[0130] The distribution unit 33 is configured to add the query request to the queue of the first thread pool when the determined result is a fast query, and add the query request to the queue of the second thread pool when the determined result is a slow query.
[0131] To isolate fast queries...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com