Data query method and database agent
A data query and database technology, applied in the field of database proxy and data query, can solve the problems of killing and affecting normal business use, and achieve the effect of improving high availability
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0025] figure 1 It is a schematic flow chart of the data query method provided by Embodiment 1 of the present invention, such as figure 1 As shown, the method includes:
[0026] Step 101, when the distributed database returns the response data, the database agent acquires the response data from the receiving buffer for local storage;
[0027] Step 102, when the size of the response data obtained from each data node in the distributed database reaches a preset value, the database agent sorts the locally stored response data and sends it to the client.
[0028] Among them, before the distributed database returns the response data, the method also includes:
[0029] The database proxy receives the query request sent by the client, the query request is used to obtain data from the distributed database and carries a sorting requirement;
[0030] The database proxy splits the query request into distributed requests corresponding to each data node in the distributed database, and ...
Embodiment 2
[0048] figure 2 A schematic flow chart of the data query method provided in Embodiment 2 of the present invention, as shown in figure 2 As shown, the method includes:
[0049] Step 201, the database proxy sends a distributed query request to all data nodes in the distributed database, waiting for response data;
[0050] Wherein, before step 201, the database proxy receives the query request sent by the client, and splits the query request into distributed query requests corresponding to each data node in the distributed database.
[0051] Specifically, for example, the database proxy receives the select order by request (ie, query request) sent by the client, and after the database proxy generates a corresponding select order by execution statement (ie, distributed query request) for each data node in the distributed database, sent to each data node respectively.
[0052] Step 202, when the distributed database returns the response data, the database agent acquires the re...
Embodiment 3
[0062] In the third embodiment, the client queries the data table t1, and the data in the data table t1 is distributed in three nodes (group1, group2, group3). The pre-configured preset value in this embodiment is 1000 rows of data, and allocate memory with the size of 1000 rows of data for group1, group2, and group3 in advance.
[0063] image 3 A schematic flow chart of the data query method provided in Embodiment 3 of the present invention, such as image 3 As shown, the method includes:
[0064] Step 301, the client sends the select ordey by statement to the data nodes group1, group2, and group3 through the database proxy proxy;
[0065] Step 302, the proxy listens to the tcp link that has issued the select ordey by statement in step 301 through epoll, and waits for ready data;
[0066] Among them, if there is no ready data, you need to continue to wait for the tcp data response; if there is ready data, then hand over the task of obtaining data on the current link to an...
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