CN109117426A - Distributed networks database query method, apparatus, equipment and storage medium - Google Patents
Distributed networks database query method, apparatus, equipment and storage medium Download PDFInfo
- Publication number
- CN109117426A CN109117426A CN201710484200.2A CN201710484200A CN109117426A CN 109117426 A CN109117426 A CN 109117426A CN 201710484200 A CN201710484200 A CN 201710484200A CN 109117426 A CN109117426 A CN 109117426A
- Authority
- CN
- China
- Prior art keywords
- query statement
- query
- merging
- memory node
- statement
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Abstract
The present invention provides a kind of distributed networks database query method, apparatus, equipment and storage medium, receives query statement, and the query statement includes target matrix, and the target matrix is the tables of data for the database for needing to inquire in the query statement;When the target matrix includes more than two, analysis determines whether the query statement meets merging condition;When the query statement meets merging condition, the query statement is merged according to the merging condition corresponding merging rule, and the query statement after merging is issued to corresponding data memory node and is handled.It is handled since the query statement after merging is issued to corresponding less data memory node, reduce the quantity for needing to be implemented the data memory node of processing, reduce the processing of distributed data base agency, alleviate the burden of distributed data base agency, execution speed can be improved, therefore, search efficiency is high.
Description
Technical field
The present invention relates to information retrieval fields more particularly to a kind of distributed networks database query method, apparatus, computer to set
Standby and storage medium.
Background technique
Distributed data base (English name is Distributed Database, abbreviation DDB) refers to that data sharing is being counted
The database on each computer in calculation machine network, these computers are properly termed as data memory node.
Traditional distributed networks database query technology, especially in the case where multilist, more data memory nodes, because introducing
Distributed query management system needs to carry out query processing to each back end of the tables of data in query statement, to lead
Cause input/output interface and the problem that network transmission data amount is excessive, the search efficiency of data memory node low.
Summary of the invention
Based on this, it is necessary to for the low problem of traditional distributed Query Efficiency, it is high to provide a kind of search efficiency
Distributed networks database query method, apparatus, equipment and storage medium.
A kind of distributed networks database query method, comprising:
Query statement is received, the query statement includes target matrix, and the target matrix is the query statement
The tables of data of the middle database for needing to inquire;
When the target matrix includes more than two, analysis determines whether the query statement meets merging condition;
When the query statement meets merging condition, according to the corresponding merging rule of the merging condition to the inquiry
Sentence merges, and the query statement after merging is issued to corresponding data memory node and is handled.
A kind of distributed networks database query device, comprising:
Query statement receiving module, for receiving query statement, the query statement includes target matrix, the target
Tables of data is the tables of data for the database for needing to inquire in the query statement;
Query statement analysis module, for when the target matrix includes more than two, analysis to determine the inquiry
Whether sentence meets merging condition;
Sentence merging issues module, for when the query statement meets merging condition, according to the merging condition pair
The merging rule answered merges the query statement, and the query statement after merging is issued to corresponding data and is deposited
Storage node is handled.
A kind of computer equipment, including memory, processor and from being stored on the memory and can be in the processing
The computer program run on device, the processor realize above-mentioned distributed networks database query when executing the computer program
The step of method.
A kind of computer storage medium is stored with computer program, the computer journey in the computer storage medium
When sequence is executed by processor, the step of realizing above-mentioned distributed networks database query method.
The above method, device, equipment and storage medium, it is corresponding less since the query statement after merging to be issued to
Data memory node is handled, and is reduced the quantity for needing to be implemented the data memory node of processing, is reduced distributed data
The processing of library agency, alleviates the burden of distributed data base agency, and execution speed can be improved, and search efficiency is high.
Detailed description of the invention
Fig. 1 is the application environment schematic diagram of the distributed networks database query method and device of an embodiment;
Fig. 2 is the flow chart of the distributed networks database query method of an embodiment;
Fig. 3 is the flow chart of the distributed networks database query method of another embodiment;
Fig. 4 is the specific flow chart of a step of the distributed networks database query method of Fig. 2 or Fig. 3;
Fig. 5 is the comparison diagram of traditional directory process and query process of the present invention;
Fig. 6 is the structure chart of the distributed networks database query device of an embodiment;
Fig. 7 is the structure chart of the distributed networks database query device of another embodiment;
Fig. 8 is the concrete structure diagram of a module of the distributed networks database query device of Fig. 6 or Fig. 7.
Specific embodiment
To facilitate the understanding of the present invention, a more comprehensive description of the invention is given in the following sections with reference to the relevant attached drawings.In attached drawing
Give preferred embodiment of the invention.But the invention can be realized in many different forms, however it is not limited to herein
Described embodiment.On the contrary, purpose of providing these embodiments is keeps the understanding to the disclosure more saturating
It is thorough comprehensive.
Unless otherwise defined, all technical and scientific terms used herein and belong to technical field of the invention
The normally understood meaning of technical staff is identical.Term as used herein in the specification of the present invention is intended merely to description tool
The purpose of the embodiment of body, it is not intended that in the limitation present invention.Term as used herein " and/or " it include one or more phases
Any and all combinations of the listed item of pass.
Fig. 1 is the application environment schematic diagram for the distributed networks database query method and device that an embodiment provides.Such as Fig. 1
Shown, which includes client terminal, distributed data base agency and no less than two data memory nodes.Client
Terminal is acted on behalf of to distributed data base by network and sends query statement.Distributed data base agency receives the query statement, right
The query statement carries out distributed networks database query.Data memory node is connect by network with distributed data base.The present invention
The distributed networks database query method and device of proposition runs on distributed data base agency, and distributed data base agency can be with
For server.Distributed data base agency is responsible for the connection of foundation and client terminal, receives the inquiry request of client terminal
Sentence analyzes the query statement received, and in the case where meeting merging condition, using merging, rule is determining to need to visit
The data memory node asked, and the merging for carrying out query statement issues execution.
Referring to Fig. 2, an embodiment of the present invention provides a kind of distributed networks database query method, comprising:
S210: receiving query statement, and query statement includes target matrix, and target matrix is to need to look into query statement
The tables of data of the database of inquiry.
Client terminal sends inquiry request to distributed data and acts on behalf of when needing to carry out inquiry operation to database,
It include query statement in the inquiry request.Distributed data agency where when this method is run receives the query statement, receives
Mode can be to receive inquiry request, to receive query statement.
Query statement can be conventional query sentence, or complex query sentence.Wherein, conventional query sentence is only
Query statement including a basic query sentence;Complex query sentence be include the inquiry for being no less than two basic query sentences
Sentence can divide basic query sentence therein for main query statement and subquery language according to the structure of complex query sentence
Sentence.
It should be noted that target matrix includes in main query statement and subquery sentence for complex query sentence
The tables of data of database inquired of needs.That is, needing to consider main query statement and subquery sentence for complex query sentence
Between merging, for example, for the complex query sentence comprising from subquery sentence and where subquery sentence.
S240: it when target matrix includes more than two, analyzes and determines whether query statement meets merging condition.
When target matrix does not include two or more, i.e., when target matrix only includes individual data table, then basis should
Query statement is directly pushed to issue and be executed on the query statement to the corresponding data memory node of the target matrix.
When target matrix includes more than two, analyzes and determine whether query statement meets merging condition.
Merging condition is the sentence that will indicate the access to each data memory node of each target database, merges into expression
To the condition of the sentence of the access of the necessary data memory node of each target matrix.For meeting the inquiry language of merging condition
Sentence, the quantity of necessary data memory node are less than the quantity of the data memory node of its each target matrix.
When query statement meets merging condition, step S250 is executed.
S250: merging query statement according to merging condition corresponding merging rule, and by the inquiry language after merging
Sentence is issued to corresponding data memory node and is handled.
It is corresponding with the condition of merging to merge rule, for that will indicate the access to each data memory node of each target database
Sentence merges into the rule for indicating the sentence of the access to the necessary data memory node of each target matrix.When inquiry language
When sentence meets merging condition, query statement is merged according to rule is merged, and the query statement after merging is issued to conjunction
Data memory node corresponding to query statement after and is handled.
The above method since query statement meets merging condition, and is carried out according to the corresponding merging rule of merging condition
Merging treatment, without accessing each data memory node of each target matrix, it is only necessary to access necessary data memory node, merge
Its corresponding data memory node is less than the data memory node before not merging afterwards.It therefore, can be by looking into after merging
Inquiry sentence is issued to corresponding data memory node and is handled, and obtains more data corresponding with preceding query statement is merged
Memory node carries out handling identical query result.Simultaneously as the query statement after merging is issued to corresponding less
Data memory node is handled, and is reduced the quantity for needing to be implemented the data memory node of processing, is reduced distributed data
The processing of library agency, alleviates the burden of distributed data base agency, execution speed can be improved, and therefore, search efficiency is high.
It is to be appreciated that can also include: the processing result for receiving data memory node and returning after step S250.Such as
This, distributed data base agency can be back to client further using the processing result as the corresponding query result of query statement
Hold terminal.
Referring to Fig. 3, in a wherein embodiment, further includes: when query statement does not meet merging condition, execute step
Rapid S260 to step S290.That is after step S240, further includes: when query statement does not meet merging condition, execute step
S260 to step S290.
S260: query statement is carried out to the simple statement for being split as meeting merging condition.
When query statement does not meet merging condition, it is split as meeting the simple statement of merging condition.
S270: simple statement is merged according to rule is merged, and each simple statement after merging is issued to correspondence
Data memory node handled.
S280: receiving the processing result that each data memory node returns, and processing result is that the simple statement after merging is corresponding
Query result.
S290: inquiry operation is carried out to processing result according to query statement, obtains the corresponding query result of query statement.
The inquiry operation is corresponding with fractionation mode used when being split query statement.In this way, available look into
Ask the corresponding query result of sentence.
It should be noted that, although can not be merged before query statement fractionation, but obtained after being split
Simple statement can merge, and therefore, the quantity for needing to be implemented the data memory node of processing integrally be reduced, to also can
Enough improve the search efficiency of query statement.
In a wherein specific embodiment, in step S280, each data memory node received can also be returned
The processing result returned is cached;At this point, step S290 is to carry out inquiry behaviour to processing result in the buffer according to query statement
Make, obtains the corresponding query result of query statement.To further increase processing speed, the search efficiency of query statement is improved.
The step of whether query statement meets merging condition determined referring to Fig. 4, analyzing in a wherein embodiment, i.e.,
Step S240, comprising:
S241: if each target matrix is duplication table, and there are intersections for the data memory node of each duplication table, then inquire
Sentence meets merging condition;
And/or
S243: if obtaining target matrix includes a not replicated table and at least one duplication table, and the number of table is respectively replicated
According to the data memory node of the intersection covering not replicated table of memory node, then query statement meets merging condition.
Covering refers to that covering object includes whole objects of capped object.Such as, it is assumed that the corresponding data of duplication table a are deposited
Storing up node is 1,2,3,4, and the intersection of the corresponding data memory node of duplication table b is 1,2,3,5, the corresponding data of not replicated table c
Memory node is 2,3.Covering object (intersection of the corresponding data memory node of duplication table a, b is 1,2,3) includes being capped
Object (the corresponding data memory node of not replicated table c be 2,3), data memory node 1,2,3 include data memory node 2,
3, then covering object (intersection of the data memory node of duplication table a, b), covering capped object, (data of not replicated table c are deposited
Store up node).
In present embodiment, according to the distribution attribute of target matrix, it can determine that query statement meets merging condition
Situation.It should be noted that distribution attribute includes duplication table and not replicated table.Wherein duplication table is to store in corresponding each data
The node of the identical tables of data of storage content in to(for) tables of data;Not replicated table is with duplication table on the contrary, in corresponding each data
The memory node of the different tables of data of storage content in to(for) tables of data.Further, not replicated table may include range table
(range table), Hash table (hash table) and list table (list table).Range table is that numerical value has in different data memory nodes
There is the table of scope limitation;Hash table, to determine the table for belonging to which data memory node according to cryptographic Hash;List table is direct
The table for being stored in which data memory node is specified in tables of data.It should be noted that regardless of attribute, tables of data is distributed
Tables of data of the same name can be all created in all data memory nodes, but is only stored in the corresponding data memory node of tables of data
Data.For example, when distributed database environment one shares 1-10 data memory node, if the corresponding data storage of tables of data
Node is 1,2,3 nodes, then tables of data can all create tables of data of the same name in this 10 data storage nodes, but only 1,2,
Storing data on 3 nodes.
When the mode by step S241, when analysis determines that query statement meets merging condition, in step S250, looked into after merging
Ask the intersection for the data memory node that the corresponding data memory node of sentence is each duplication table.
When the mode by step S243, when analysis determines that query statement meets merging condition, in step S250, looked into after merging
Ask each data memory node that the corresponding data memory node of sentence is not replicated table.
If the distribution attribute according only to target matrix can when can not determine whether query statement meets merging condition
To be further made whether to meet the analysis of merging condition according to the structure of query statement.Following two embodiment include two kinds only
It can not temporarily determine whether to meet merging condition by distributing attribute, and combine query statement to can be determined that later and meet merging
The case where condition.
Please continue to refer to Fig. 4, the step for determining whether query statement meets merging condition is analyzed in one of the embodiments,
Suddenly, i.e. step S240, further includes:
S245: if target matrix includes at least two not replicated tables, and query statement includes equivalent chain or where value
Chain, then the data memory node of the target matrix according to involved in equivalent chain or where value chain is filtered not replicated table.
S247: by only the distribution attribute modification of the not replicated table including individual data memory node is duplication table after filtering
Afterwards, it analyzes and determines whether query statement meets merging condition.
In the distribution attribute according to target matrix, when determining that target matrix includes at least two not replicated table, only root
Can not temporarily determine whether query statement meets merging condition according to distribution attribute, need further according to the structure of query statement come into
Row further analysis.When query statement includes equivalent chain or where value chain, according to involved in equivalent chain or where value chain
The data memory node of target matrix is filtered not replicated table;It will be only non-including individual data memory node after filtering
The distribution attribute modification for replicating table is duplication table, and iteration executes to analyze the step of whether query statement meets merging condition determined.
To simplify target matrix between merging rule, be allowed to it is subsequent can by the distribution attribute according only to target matrix,
Determine whether query statement meets merging condition.And then query statement is merged, reduce the data for needing to be implemented processing
The quantity of memory node, to improve the search efficiency of query statement.Wherein, equivalent chain refers to that description is equal to pass in query statement
The code of system;Where value chain refers to the code in query statement including where and its particular content.
On the basis of a upper embodiment, analyzes and the step of whether query statement meets merging condition, i.e. step determined
S240, further includes:
S249: if filtered each not replicated table includes at least two identical data memory nodes and each not replicated table
Data memory node between there are section covering relations, then query statement meets merging condition.
It if what filtered not replicated table included is not individual data memory node, that is, include at least two data storage section
Point, each data memory node for including in each not replicated table are identical, and there are section covering relations between each data memory node
In the case where, it just can determine that query statement meets merging condition.In this case query statement can be merged, this
When, in step S250, the corresponding data memory node of query statement is the data that filtered each not replicated table includes after merging
Memory node.
Section covering relation refers to that the query statement of the data memory node storage of each not replicated table to be inquired, of the same name
Tables of data in specific data data value in range have covering relation.Such as, range table a, b is stored in data storage
In node 1 and 2, a data in range table a, the memory range in data memory node 1 is 50-100, stores and saves in data
Memory range in point 2 is 1000-2000;And the same data in range table b, the memory range in memory node 1 are
50-60, the memory range in data memory node 2 are 1000-1200, then the data of declared range table a and range table b store
There are section covering relations between node.It is to be appreciated that covering can be a covering b, it is also possible to b covering a, or section
A covers b on point 1, b covering a etc. on node 2, it is not limited to this example.
Please continue to refer to Fig. 3, in a wherein embodiment, the step for determining whether query statement meets merging condition is analyzed
Before rapid, i.e. before step S240, further includes:
S230: obtaining and stores metadata information, and metadata information includes the distribution attribute of tables of data and the number of tables of data
According to memory node.Distributing attribute includes duplication table and not replicated table.
In this way, storing metadata information in distributed data base agency, can be obtained according to the metadata information of the storage
To the distribution attribute of target matrix, therefore, it is determined that whether it includes one that whether target matrix is duplication table, target matrix
A not replicated table and no less than one duplication table, target matrix include being no less than two not replicated tables etc., determine each tables of data
Data memory node.
It is illustrated below with beneficial effect of the specific example to above-mentioned distributed networks database query method.
Referring to Fig. 5, for the query process conventional without Fusion query sentence and above-mentioned inquiry through the invention
Method query statement is merged after query process comparison.
When distributed data base agency receives multilist conjunctive query sentence, it is assumed that target matrix includes table a and table b.
Table a and table b is duplication table, and table a is on data memory node 1 to data memory node 3;Table b is on data memory node 2.
It include the query statement that a, b are inquired, traditional query process to target matrix are as follows: proxy (distributed data base generation
Reason) it needs for query statement to be sent to and be inquired on data memory node 1, data memory node 2 and data memory node 3,
Then processing result is returned to proxy by each data memory node, and proxy carries out a data after receiving processing result again
Processing is inquiry operation, and the data processing or inquiry operation can be the operation such as data deduplication, sort result, specifically can be according to looking into
Sentence condition is ask to determine.It include the query statement that a, b are inquired to target matrix, query process of the invention is then are as follows:
Proxy analyzes query statement, and since table a and table b is duplication table, and it is data that its data memory node, which has intersection,
Memory node 2, therefore analyzing result is that query statement meets merging condition, is closed at this time according to merging rule to query statement
And only need for the query statement after merging to be issued on data memory node 2 in the specific example and inquire, at this time
Proxy, which only needs to send the query statement after merging to directly to execute on data memory node 2, can be obtained result.Due to inciting somebody to action
Query statement after merging is issued to corresponding less data memory node and is handled, and reduces the number for needing to be implemented processing
According to the quantity of memory node, reduce the processing of distributed data base agency, alleviates the burden of distributed data base agency, it can
Speed is executed to improve, therefore, search efficiency is high.
The present invention also provides a kind of distributed networks database query devices corresponding with above-mentioned distributed networks database query method.
Referring to Fig. 6, the cloth database inquiry device of an embodiment, comprising:
Query statement receiving module 610, for receiving query statement, query statement includes target matrix, target data
Table is the tables of data for the database for needing to inquire in query statement;
Query statement analysis module 640 determines that query statement is for analyzing when target matrix includes more than two
It is no to meet merging condition;
Sentence merging issues module 650, for when query statement meets merging condition, according to the corresponding conjunction of the condition of merging
And rule merges query statement, and the query statement after merging is issued at corresponding data memory node
Reason.
Above-mentioned apparatus since query statement meets merging condition, and is carried out according to the corresponding merging rule of merging condition
Merging treatment, without accessing each data memory node of each target matrix, it is only necessary to access necessary data memory node, merge
Its corresponding data memory node is less than the data memory node before not merging afterwards.It therefore, can be by looking into after merging
Inquiry sentence is issued to corresponding data memory node and is handled, and obtains more data corresponding with preceding query statement is merged
Memory node carries out handling identical query result.Simultaneously as the query statement after merging is issued to corresponding less
Data memory node is handled, and is reduced the quantity for needing to be implemented the data memory node of processing, is reduced distributed data
The processing of library agency, alleviates the burden of distributed data base agency, execution speed can be improved, and therefore, search efficiency is high.
Referring to Fig. 7, in a wherein embodiment, further includes:
Query statement splits module 660, for when query statement does not meet merging condition, query statement being split as according with
Close the simple statement of merging condition;
Simple statement merging module 670, for being merged according to merging rule to simple statement, and will be each after merging
Simple statement is issued to corresponding data memory node and is handled;
Intermediate result receiving module 680, the processing result returned for receiving each data memory node, processing result are to close
The corresponding query result of simple statement after and;
Query result determining module 690 obtains inquiry language for carrying out inquiry operation to processing result according to query statement
The corresponding query result of sentence.
Referring to Fig. 8, in a wherein embodiment, query statement analysis module 640, comprising:
First depth analysis unit 641, if being duplication table for each target matrix, and the data storage of each duplication table
There are intersections for node, then query statement meets merging condition;
And/or
Second depth analysis unit 643, if including a not replicated table and at least one duplication table for target matrix,
And the data memory node of the intersection covering not replicated table of the data memory node of each duplication table, then query statement meets merging item
Part.
Further, query statement analysis module 640, further includes:
Third depth analysis unit 645, if including at least two not replicated tables, and query statement packet for target matrix
Equivalent chain or where value chain are included, then the data memory node pair of the target matrix according to involved in equivalent chain or where value chain
Not replicated table is filtered;
Third depth analysis unit 645 only includes the not replicated table of individual data memory node after being also used to filter
Distributing attribute modification is to analyze after replicating table and determine whether query statement meets merging condition.
Further, query statement analysis module 640, further includes:
4th depth analysis unit 647, if including that at least two identical data are deposited for filtered each not replicated table
There are section covering relations between storage node and the data memory node of each not replicated table, then query statement meets merging condition.
Please continue to refer to Fig. 7, in a wherein embodiment, further includes:
Data acquisition memory module 630, for obtaining and storing metadata information, metadata information includes point of tables of data
Send out the data memory node of attribute and tables of data;Distributing attribute includes duplication table and not replicated table.
The present invention also provides a kind of computer equipments corresponding with above-mentioned distributed networks database query method, including storage
Device, processor and from storage on a memory and the computer program that can run on a processor, processor execution computer journey
The step of above-mentioned distributed networks database query method is realized when sequence.
The present invention also provides a kind of computer storage medium corresponding with above-mentioned distributed networks database query method, computers
It is stored with computer program on storage medium, when computer program is executed by processor, realizes that above-mentioned distributed data base is looked into
The step of inquiry method.
Since above-mentioned apparatus, computer equipment and computer storage medium are corresponded to each other with the above method, for device, meter
Details technical characteristic corresponding with method in machine equipment and computer storage medium is calculated, therefore not to repeat here.
Only several embodiments of the present invention are expressed for above embodiments, and the description thereof is more specific and detailed, but can not
Therefore limitations on the scope of the patent of the present invention are interpreted as.It should be pointed out that for those of ordinary skill in the art,
Without departing from the inventive concept of the premise, multiple modification and improvement can also be made, these belong to protection model of the invention
It encloses.Therefore, the scope of protection of the patent of the invention shall be subject to the appended claims.
Claims (10)
1. a kind of distributed networks database query method characterized by comprising
Query statement is received, the query statement includes target matrix, and the target matrix is to need in the query statement
The tables of data of the database to be inquired;
When the target matrix includes more than two, analysis determines whether the query statement meets merging condition;
When the query statement meets merging condition, according to the corresponding merging rule of the merging condition to the query statement
It merges, and the query statement after merging is issued to corresponding data memory node and is handled.
2. distributed networks database query method according to claim 1, which is characterized in that further include:
When the query statement does not meet merging condition, the query statement is split as to meet the simple of the merging condition
Sentence;
The simple statement is merged according to merging rule, and each simple statement after merging is issued to pair
The data memory node answered is handled;
The processing result that each data memory node returns is received, the processing result is the simple statement pair after merging
The query result answered;
Inquiry operation is carried out to the processing result according to the query statement, obtains the corresponding inquiry knot of the query statement
Fruit.
3. distributed networks database query method according to claim 1, which is characterized in that the analysis determines the inquiry
Whether sentence meets the step of merging condition, comprising:
If each target matrix is duplication table, and there are intersections for the data memory node of each duplication table, then described
Query statement meets the merging condition;
And/or
If the target matrix includes a not replicated table and at least one described duplication table, and the data of each duplication table
The intersection of memory node covers the data memory node of the not replicated table, then the query statement meets the merging condition.
4. distributed networks database query method according to claim 3, which is characterized in that analysis determines the query statement
The step of whether meeting merging condition, further includes:
If the target matrix includes at least two not replicated tables, and the query statement includes equivalent chain or where value chain,
Then the data memory node of the target matrix according to involved in the equivalent chain or the where value chain is to described non-multiple
Tabulation is filtered;
By only the distribution attribute modification of the not replicated table including individual data memory node is analysis determination after duplication table after filtering
Whether query statement meets the merging condition.
5. distributed networks database query method according to claim 4, which is characterized in that analysis determines the query statement
The step of whether meeting merging condition, further includes:
If filtered each not replicated table includes at least two identical data memory nodes and each not replicated table
There are section covering relations between data memory node, then the query statement meets the merging condition.
6. distributed networks database query method described in -5 any one according to claim 1, which is characterized in that the analysis is true
Before the step of whether fixed query statement meets merging condition, further includes:
Obtain and store metadata information, the metadata information include the tables of data distribution attribute and the tables of data
Data memory node;The distribution attribute includes duplication table and not replicated table.
7. a kind of distributed networks database query device characterized by comprising
Query statement receiving module, for receiving query statement, the query statement includes target matrix, the target data
Table is the tables of data for the database for needing to inquire in the query statement;
Query statement analysis module, for when the target matrix includes more than two, analysis to determine the query statement
Whether merging condition is met;
Sentence merging issues module, corresponding according to the merging condition for when the query statement meets merging condition
Merge rule to merge the query statement, and the query statement after merging is issued to corresponding data storage section
Point is handled.
8. distributed networks database query device according to claim 7, which is characterized in that further include:
Query statement splits module, for when the query statement does not meet merging condition, the query statement to be split as
Meet the simple statement of the merging condition;
Simple statement merging module, for being merged according to the merging rule to the simple statement, and will be after merging
Each simple statement is issued to corresponding data memory node and is handled;
Intermediate result receiving module, the processing result returned for receiving each data memory node, the processing result are
The corresponding query result of the simple statement after merging;
Query result determining module obtains described for carrying out inquiry operation to the processing result according to the query statement
The corresponding query result of query statement.
9. a kind of computer equipment, including memory, processor and from being stored on the memory and can be in the processor
The computer program of upper operation, which is characterized in that the processor realizes that claim 1-6 appoints when executing the computer program
The step of distributed networks database query method described in meaning one.
10. a kind of computer storage medium, computer program is stored in the computer storage medium, which is characterized in that institute
When stating computer program and being executed by processor, distributed networks database query method as claimed in any one of claims 1 to 6 is realized
The step of.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710484200.2A CN109117426B (en) | 2017-06-23 | 2017-06-23 | Distributed database query method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710484200.2A CN109117426B (en) | 2017-06-23 | 2017-06-23 | Distributed database query method, device, equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109117426A true CN109117426A (en) | 2019-01-01 |
CN109117426B CN109117426B (en) | 2023-06-09 |
Family
ID=64732951
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710484200.2A Active CN109117426B (en) | 2017-06-23 | 2017-06-23 | Distributed database query method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109117426B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112364059A (en) * | 2020-11-10 | 2021-02-12 | 平安普惠企业管理有限公司 | Correlation matching method, device, equipment and storage medium under multi-rule scene |
CN113792079A (en) * | 2021-11-17 | 2021-12-14 | 腾讯科技(深圳)有限公司 | Data query method and device, computer equipment and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030074352A1 (en) * | 2001-09-27 | 2003-04-17 | Raboczi Simon D. | Database query system and method |
CN103455641A (en) * | 2013-09-29 | 2013-12-18 | 方正国际软件有限公司 | Crossing repeated retrieval system and method |
CN104123374A (en) * | 2014-07-28 | 2014-10-29 | 北京京东尚科信息技术有限公司 | Method and device for aggregate query in distributed databases |
CN104699788A (en) * | 2015-03-16 | 2015-06-10 | 百度在线网络技术(北京)有限公司 | Database query method and device |
CN105975617A (en) * | 2016-05-20 | 2016-09-28 | 北京京东尚科信息技术有限公司 | Multi-partition-table inquiring and processing method and device |
-
2017
- 2017-06-23 CN CN201710484200.2A patent/CN109117426B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030074352A1 (en) * | 2001-09-27 | 2003-04-17 | Raboczi Simon D. | Database query system and method |
CN103455641A (en) * | 2013-09-29 | 2013-12-18 | 方正国际软件有限公司 | Crossing repeated retrieval system and method |
CN104123374A (en) * | 2014-07-28 | 2014-10-29 | 北京京东尚科信息技术有限公司 | Method and device for aggregate query in distributed databases |
CN104699788A (en) * | 2015-03-16 | 2015-06-10 | 百度在线网络技术(北京)有限公司 | Database query method and device |
CN105975617A (en) * | 2016-05-20 | 2016-09-28 | 北京京东尚科信息技术有限公司 | Multi-partition-table inquiring and processing method and device |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112364059A (en) * | 2020-11-10 | 2021-02-12 | 平安普惠企业管理有限公司 | Correlation matching method, device, equipment and storage medium under multi-rule scene |
CN112364059B (en) * | 2020-11-10 | 2023-12-22 | 国网甘肃省电力公司白银供电公司 | Correlation matching method, device, equipment and storage medium under multi-rule scene |
CN113792079A (en) * | 2021-11-17 | 2021-12-14 | 腾讯科技(深圳)有限公司 | Data query method and device, computer equipment and storage medium |
CN113792079B (en) * | 2021-11-17 | 2022-02-08 | 腾讯科技(深圳)有限公司 | Data query method and device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109117426B (en) | 2023-06-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106168965B (en) | Knowledge graph construction system | |
Verma et al. | Big data management processing with Hadoop MapReduce and spark technology: A comparison | |
Tao et al. | Minimal mapreduce algorithms | |
CN106708996B (en) | Method and system for full text search of relational database | |
EP0981097A1 (en) | Search system and method for providing a fulltext search over web pages of world wide web servers | |
Greenberg et al. | {MDHIM}: A Parallel {Key/Value} Framework for {HPC} | |
US8321873B2 (en) | System and method for offline data generation for online system analysis | |
CN103559300B (en) | The querying method and inquiry unit of data | |
CN113360554B (en) | Method and equipment for extracting, converting and loading ETL (extract transform load) data | |
CN104239377A (en) | Platform-crossing data retrieval method and device | |
KR20130049111A (en) | Forensic index method and apparatus by distributed processing | |
CN111221791A (en) | Method for importing multi-source heterogeneous data into data lake | |
CN107016039B (en) | Database writing method and database system | |
US20150120697A1 (en) | System and method for analysis of a database proxy | |
Srikanth et al. | Machine Learning for Query Processing System and Query Response Time using Hadoop | |
CN111221785A (en) | Semantic data lake construction method of multi-source heterogeneous data | |
CN112445776B (en) | Presto-based dynamic barrel dividing method, system, equipment and readable storage medium | |
CN109117426A (en) | Distributed networks database query method, apparatus, equipment and storage medium | |
Muddasir et al. | Study of methods to achieve near real time ETL | |
CN113468209A (en) | High-speed memory database access method for power grid monitoring system | |
KR20180077830A (en) | Processing method for a relational query in distributed stream processing engine based on shared-nothing architecture, recording medium and device for performing the method | |
CN108319604A (en) | The associated optimization method of size table in a kind of hive | |
Xu et al. | Sparkrdf: In-memory distributed rdf management framework for large-scale social data | |
US11847121B2 (en) | Compound predicate query statement transformation | |
CN115982230A (en) | Cross-data-source query method, system, equipment and storage medium of database |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20220107 Address after: 100176 602, floor 6, building 6, courtyard 10, KEGU 1st Street, Beijing Economic and Technological Development Zone, Daxing District, Beijing (Yizhuang group, high-end industrial area of Beijing Pilot Free Trade Zone) Applicant after: Jinzhuan Xinke Co.,Ltd. Address before: 518000 Zhongnan communication tower, South China Road, Nanshan District high tech Industrial Park, Shenzhen, Guangdong Applicant before: ZTE Corp. |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant |