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

Pending Publication Date: 2020-06-26
金篆信科有限责任公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] And if the client executes sorting statements through PROXY with high concurrency, the PROXY process will be killed by the kernel oom killer (Out-Of-Memory killer) mechanism due to excessive memory usage, affecting normal business use

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Data query method and database agent
  • Data query method and database agent
  • Data query method and database agent

Examples

Experimental program
Comparison scheme
Effect test

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...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The embodiment of the invention discloses a data query method and a database agent, and the method comprises the steps that the database agent obtains the response data from a receiving buffering region for local storage when a distributed database returns the response data; and when the size of the response data obtained from each data node in the distributed database reaches a preset value, thedatabase agent sorts the locally stored response data and sends the sorted response data to the client. In this way, the use of the memory read by the PROXY end is controlled through the preset value,so that the high availability of the system is improved.

Description

technical field [0001] The embodiment of the invention relates to but not limited to distributed database technology, and more specifically relates to a data query method and database agent. Background technique [0002] The table data in the distributed database will be distributed in different data nodes according to a certain distribution strategy. If the execution statement involves sorting and the read data involves multiple data nodes, the distributed data service proxy server PROXY is required to All response data returned by each data node is stored in local memory, sorted uniformly and sent to the client. When tens of millions or even hundreds of millions of data are involved, the memory requirements of the server are relatively high for performing sorting operations. [0003] Moreover, if the client executes sorting statements through PROXY at high concurrency, the PROXY process will be killed by the kernel oom killer (Out-Of-Memory killer) mechanism due to excess...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
IPC IPC(8): G06F16/2455G06F16/2457G06F16/27
CPCG06F16/2455G06F16/27G06F16/2457G06F16/24Y02D10/00
Inventor 丁岩马玉伟
Owner 金篆信科有限责任公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products