CN104166738A - Database query processing method and device - Google Patents

Database query processing method and device Download PDF

Info

Publication number
CN104166738A
CN104166738A CN201410450214.9A CN201410450214A CN104166738A CN 104166738 A CN104166738 A CN 104166738A CN 201410450214 A CN201410450214 A CN 201410450214A CN 104166738 A CN104166738 A CN 104166738A
Authority
CN
China
Prior art keywords
server
data
query
database
querying
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.)
Pending
Application number
CN201410450214.9A
Other languages
Chinese (zh)
Inventor
洪超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gridsum Technology Co Ltd
Original Assignee
Beijing Gridsum Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Gridsum Technology Co Ltd filed Critical Beijing Gridsum Technology Co Ltd
Priority to CN201410450214.9A priority Critical patent/CN104166738A/en
Publication of CN104166738A publication Critical patent/CN104166738A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/217Database tuning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computational Linguistics (AREA)
  • Computing Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a database query processing method and device. The method comprises the steps that a data processing server carries out data processing on a first database, data in the first database are synchronized into a second database on the data processing server, and a data query server carries out data query on the second database. By means of the database query processing method and device, the problems that because too many CPU resources are consumed and too many memory resources are occupied in the database data processing process, resources are insufficient when data query operation is carried out in the database data processing process and consequently errors are caused or the query process consumes a long time are effectively solved, data processing and data query in the databases are separated, query resource consumption and processing resource consumption are isolated, the memory resource consumption is small, the data query speed is higher, and the query stability is guaranteed at the same time.

Description

The method of data base querying processing and device
Technical field
The present invention relates to data processing field, in particular to a kind of method and device of data base querying processing.
Background technology
Database is a kind of conventional data disposal system, can store all relevant datas of an application.Data in database are to set up for numerous user shares its information, have broken away from restriction and the restriction of specific procedure.Different users can be by the data in usage usage data storehouse separately, and multiple users are the data resource in shared data bank simultaneously, i.e. the different users same data in access database simultaneously.Data sharing has not only met the requirement of each user to the information content, has also met the requirement of each user-to-user information communication simultaneously.
Data analytics server (SQL Services Analysis Services is called for short SSAS) for pooled data excavate solution an integrated platform is provided.In SSAS database, can use relation data or cube data creation to there is the commercial intelligence resolution of forecast analysis function.In the time that SSAS database carries out deal with data, can consume too much CPU, committed memory resource is large, thereby causes carrying out data query operation to there will be inadequate resource in the time of database processing data and report an error or query script expends time in very long.
For consuming too much CPU when the database processing data in correlation technique, committed memory resource is large, thereby cause carrying out data query operation to there will be inadequate resource in the time of database processing data and report an error or the query script very long problem that expends time in, not yet proposing at present effective solution.
Summary of the invention
Fundamental purpose of the present invention is to provide a kind of method and device of data base querying processing, can consume too much CPU to solve when the database processing data, committed memory resource is large, thereby causes carrying out data query operation to there will be inadequate resource in the time of database processing data and report an error or the query script very long problem that expends time in.
To achieve these goals, according to an aspect of the present invention, provide a kind of method of data base querying processing.Data base querying disposal route according to the present invention comprises: by data processing server, to the first database executing data processing, wherein, this first database is stored on this data processing server; Data in this first database are synchronized to the second database on data query server, and wherein, this querying server is for inquiring about data; By this data query server, this second database executing data is inquired about.
Further, this data query server comprises multiple queries server, the plurality of querying server comprises the first querying server and the second querying server, and by this data query server, to this second database executing data, inquiry comprises: whether the priority that judges this first querying server is higher than the priority of this second querying server; Priority in the priority of this first querying server higher than this second querying server, by this first querying server to the second database executing data inquiry on this first querying server; Priority in the priority of this first querying server lower than this second querying server, by this second querying server to the second database executing data inquiry on this second querying server.
Further, the second database that data in this first database are synchronized on data query server comprises: this data query server calls synchronic command, wherein, this synchronic command is for carrying out synchronously the data of this first database on this data processing server; By moving this synchronic command, the data in this first database are synchronized to this second database on this data query server.
Further, by this data query server, the data in this second database are inquired about and comprised: inquiry Distributor connects this data query server, and wherein, this inquiry Distributor is used for collecting all inquiry request information and Query Result; On this data query server, obtain the information of data query; By the information of this data query, this data query server sends query statement; Inquiry Distributor obtains Query Result.
Whether further,, after the data in this second database being inquired about on this data query server, the method also comprises: judge on this data query server successful to this second data base querying; If unsuccessful to this second data base querying on this data query server, choose this data processing server this first database is inquired about; Inquiry Distributor connects this data processing server; On this data processing server, obtain the information of data query; By the information of this data query, this data processing server sends query statement; Inquiry Distributor obtains Query Result.
To achieve these goals, according to a further aspect in the invention, provide the device of data base querying processing.This device comprises: processing unit, for by data processing server to the first database executing data processing, wherein, this first database is stored on this data processing server; Lock unit, for the data of this first database being synchronized to the second database on data query server, wherein, this querying server is for inquiring about data; Query unit, for inquiring about this second database executing data by this data query server.
Further, this data query server comprises multiple queries server, the plurality of querying server comprises the first querying server and the second querying server, query unit comprises: judge module, for the priority that judges this first querying server whether higher than the priority of this second querying server; Enquiry module, for the priority higher than this second querying server in the priority of this first querying server, by this first querying server to the second database executing data inquiry on this first querying server; Priority in the priority of this first querying server lower than this second querying server, by this second querying server to the second database executing data inquiry on this second querying server.
Further, lock unit comprises: calling module, and for this data query server calls synchronic command, wherein, this synchronic command is for carrying out synchronously the data of this first database on this data processing server; Synchronization module, for being synchronized to this second database on this data query server by moving this synchronic command by the data of this first database.
Further, query unit comprises: link block, connect this data query server for inquiring about Distributor, and wherein, this inquiry Distributor is used for collecting all inquiry request information and Query Result; The first acquisition module, for obtaining the information of data query on this data query server; Sending module, for passing through the information of this data query, this data query server sends query statement; The second acquisition module, obtains Query Result for inquiring about Distributor.
Further, this device also comprises: judging unit, and whether successful to this second data base querying for judging on this data query server; Choose unit, on this data query server in the unsuccessful situation of this second data base querying, choose this data processing server this first database inquired about; Linkage unit, connects this data processing server for inquiring about Distributor; The first acquiring unit, for obtaining the information of data query on this data processing server; Transmitting element, for passing through the information of this data query, this data processing server sends query statement; Second acquisition unit, obtains Query Result for inquiring about Distributor.
By the method for data base querying processing provided by the invention, the method by data processing server to the first database executing data processing; Data in this first database are synchronized to the second database on data query server; By this data query server, this second database executing data is inquired about, solve in the time of database processing data and can consume too much CPU, committed memory resource is large, in the time of database processing data, carry out data query operation to there will be inadequate resource and report an error or the query script very long problem that expends time in, reached data processing in database, inquiry be separated, the resource consumption of having isolated inquiry and having processed, committed memory resource is few, makes data query speed ensure sooner the effect of the stability of inquiry simultaneously.
Brief description of the drawings
The accompanying drawing that forms the application's a part is used to provide a further understanding of the present invention, and schematic description and description of the present invention is used for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is according to the process flow diagram of the first embodiment of the method for data base querying processing of the present invention;
Fig. 2 is according to the process flow diagram of the second embodiment of the method for data base querying processing of the present invention;
Fig. 3 is according to the process flow diagram of the 3rd embodiment of the method for data base querying processing of the present invention;
Fig. 4 is according to the process flow diagram of the 4th embodiment of the method for data base querying processing of the present invention;
Fig. 5 is according to the process flow diagram of the 5th embodiment of the method for data base querying processing of the present invention;
Fig. 6 is according to the schematic diagram of the first embodiment of the device of data base querying processing of the present invention;
Fig. 7 is according to the schematic diagram of the second embodiment of the device of data base querying processing of the present invention;
Fig. 8 is according to the schematic diagram of the 3rd embodiment of the device of data base querying processing of the present invention;
Fig. 9 is according to the schematic diagram of the 4th embodiment of the device of data base querying processing of the present invention; And
Figure 10 is according to the schematic diagram of the 5th embodiment of the device of data base querying processing of the present invention.
Embodiment
It should be noted that, in the situation that not conflicting, the feature in embodiment and embodiment in the application can combine mutually.Describe below with reference to the accompanying drawings and in conjunction with the embodiments the present invention in detail.
Fig. 1 is according to the process flow diagram of the first embodiment of the method for data base querying processing of the present invention.As shown in Figure 1, the method for this data base querying processing comprises:
Step S101, by data processing server, to the first database executing data processing, wherein, the first database is stored on data processing server.
Data processing server is the client of database server, after the data that the acquisition communication server is sent, by the data processor on operation backstage with by the form of making an appointment, therefrom isolates various real-time information write into Databasce server.By data processing server, the first database being stored on data processing server is processed, wherein, the first database is the general designation to being stored in database on data processing server.
Step S102, is synchronized to the second database on data query server by the data in the first database, and wherein, querying server is for inquiring about data.
After data processing server is processed successfully to the first database executing data, the Xmla instruction of invoke synchronous on querying server, wherein Xmla instruction is the processing instruction of data analytics server.For example, on data query server, invoke synchronous Xmla instruction moves on data processing server, and the data from data processing server in corresponding database are synchronized on data query server.For example, operation synchronic command is as follows:
By aforesaid operations, the data in the first database are synchronized to the second database on data query server.
Another kind of mode is, can be by obtaining the successful file of up-to-date processing the update time of file, correspondence position by successful up-to-date processing file copy to the corresponding data library file of data query server, if file is lockable, can discharge or first pass through by lock the unloading operation of database in data analytics server, by the additional operations of database in data analytics server, make the successful file synchronization of up-to-date processing to data query server again.
Step S103, inquires about the second database executing data by data query server.
Select data query server to carry out executing data query manipulation, data query server change server connection string, data query server connects inquiry Distributor, and inquiry Distributor is used for collecting all inquiry request information and Query Result.On data query server, obtain the information of the data query of input, by the information of data query of input, data query server sends query statement, acquires Query Result.Check Query Result at inquiry Distributor.Judge on data query server whether successful to the second data base querying process, whether there is report to connect or other inquiry error, if on data query server to reporting an error in the second data base querying process, for fear of situation about obtaining less than Query Result, by the priority of data query server, successively data query server executing data is inquired about, if all data query servers, to all reporting an error in the second data base querying process, are chosen data processing server the first database are inquired about.
While carrying out data query, by data query processing server is done to dynamic screening, carry out data query by the querying server of limit priority, if the querying server executing data inquiry of request time priority automatically while inquiring about unsuccessfully, by that analogy.If all data query servers all report an error in query script, inquire about unsuccessfully, switch to and on data processing server, carry out data query.Be separated by data processing, inquiry in database, the resource consumption of having isolated inquiry and having processed, committed memory resource is few, makes data query speed ensure sooner the effect of the stability of inquiry simultaneously.For data query provides hot standby, ensured the stability of data query simultaneously.
The method of the data base querying processing providing in embodiments of the invention, the method by data processing server to the first database executing data processing; Data in this first database are synchronized to the second database on data query server; By this data query server, this second database executing data is inquired about.Solve in the time of database processing data and can consume too much CPU, committed memory resource is large, in the time of database processing data, carry out data query operation to there will be inadequate resource and report an error or the query script very long problem that expends time in, reached data processing in database, inquiry be separated, the resource consumption of having isolated inquiry and having processed, committed memory resource is few, makes data query speed ensure sooner the effect of the stability of inquiry simultaneously.
Fig. 2 is according to the process flow diagram of the second embodiment of the method for data base querying processing of the present invention.As shown in Figure 2, the method for this data base querying processing comprises:
Step S201, by data processing server, to the first database executing data processing, wherein, the first database is stored on data processing server.
This step is with above-mentioned steps S101.
Step S202, is synchronized to the second database on data query server by the data in the first database, and wherein, querying server is for inquiring about data.
This step is with above-mentioned steps S102.
Step S203, whether the priority that judges the first querying server is higher than the priority of the second querying server.
Priority is computer time sharing system in the time processing multiple job procedure, determines that each job procedure accepts the parameter of the priority level of system resource.For example, want character or its length of follow procedure, or by the source of operation etc., specify its priority, then computing machine is according to the height of each job procedure priority, decide the precedence of processing each program, even, in processing procedure, can also allow the lower program of program interrupt priority that priority is higher.Process has priority.If the priority of the process of moving by the priority ratio of the process of being moved is high, system can be deprived the CPU of the process of moving by force, allows the high process of priority first move.
To every data query device being pre-set to priority on data processing server, data query server comprises multiple queries server, multiple queries server comprises the first querying server and the second querying server, judge that the priority of the first querying server, whether higher than the priority of the second querying server, is to judge the highest querying server of data processing server medium priority.
Step S204, the priority in the priority of the first querying server lower than the second querying server, by the second querying server to the second database executing data inquiry on the second querying server.
Step S205, the priority in the priority of the first querying server higher than the second querying server, by the first querying server to the second database executing data inquiry on the first querying server.
The method of the data base querying processing providing in embodiments of the invention, the method by data processing server to the first database executing data processing; Data in this first database are synchronized to the second database on data query server; Whether the priority that judges the first querying server is higher than the priority of the second querying server; Priority in the priority of the first querying server lower than the second querying server, by the second querying server to the second database executing data inquiry on the second querying server; Priority in the priority of the first querying server higher than the second querying server, by the first querying server to the second database executing data inquiry on the first querying server.Solve in the time of database processing data and can consume too much CPU, committed memory resource is large, in the time of database processing data, carry out data query operation to there will be inadequate resource and report an error or the query script very long problem that expends time in, reached data processing in database, inquiry be separated, the resource consumption of having isolated inquiry and having processed, committed memory resource is few, data are inquired about according to its priority by many querying servers, make data query speed ensure sooner the effect of the stability of inquiry simultaneously.
Fig. 3 is according to the process flow diagram of the 3rd embodiment of the method for data base querying processing of the present invention.As shown in Figure 3, the method for this data base querying processing comprises:
Step S301, by data processing server, to the first database executing data processing, wherein, the first database is stored on data processing server.
This step is with above-mentioned steps S101.
Step S302, data query server calls synchronic command, wherein, synchronic command is for carrying out synchronously the data of the first database on data processing server.
After data processing server is processed successfully to the first database executing data, the Xmla instruction of invoke synchronous on querying server, wherein Xmla instruction is the processing instruction of data analytics server, invoke synchronous Xmla instruction on data query server.
Step S303, is synchronized to the second database on data query server by operation synchronic command by the data in the first database.
On data query server, move synchronic command, from data processing server in synchronous associated databases data to the corresponding database of data query server.
Step S304, inquires about the second database executing data by data query server.
This step is with above-mentioned steps S103.
The method of the data base querying processing providing in embodiments of the invention, the method by data processing server to the first database executing data processing; Data query server calls synchronic command; By operation synchronic command, the data in the first database are synchronized to the second database on data query server.By data query server, the second database executing data is inquired about.Solve in the time of database processing data and can consume too much CPU, committed memory resource is large, in the time of database processing data, carry out data query operation to there will be inadequate resource and report an error or the query script very long problem that expends time in, reach invoke synchronous instruction, data in data processing server are synchronized in data query server in time, thereby data processing, inquiry are separated in database, the resource consumption of having isolated inquiry and having processed, the effect that committed memory resource is few.
Fig. 4 is according to the process flow diagram of the 4th embodiment of the method for data base querying processing of the present invention.As shown in Figure 4, the method for this data base querying processing comprises:
Step S401, by data processing server, to the first database executing data processing, wherein, the first database is stored on data processing server.
This step is with above-mentioned steps S101.
Step S402, is synchronized to the second database on data query server by the data in the first database, and wherein, querying server is for inquiring about data.
This step is with above-mentioned steps S102.
Step S403, inquiry Distributor connection data querying server, wherein, inquiry Distributor is used for collecting all inquiry request information and Query Result.
In data processing field, inquiry Distributor is used for all inquiry request information of collection system, and inquiry request information is sent to querying server; When querying server poll-final, inquiry Distributor receives the Query Result of querying server.On data query server, revise the character string of connection server, by this operation, make to inquire about Distributor and be connected with data query server.
Step S404 obtains the information of data query on data query server.
Be connected with inquiry Distributor by data query server, the information of carrying out data query of collecting is sent to data query server by inquiry Distributor, and data query server obtains data query information.
Step S405, by the information of data query, data query server sends query statement.
Step S406, inquiry Distributor obtains Query Result.
Data query server carries out after data query finishes, Query Result being sent to inquiry Distributor, and inquiry Distributor obtains Query Result.User can check Query Result in inquiry Distributor.
The method of the data base querying processing providing in embodiments of the invention, the method by data processing server to the first database executing data processing; Data in the first database are synchronized to the second database on data query server; Inquiry Distributor connection data querying server; The information exchange that obtains data query on data query server is crossed the information of data query; Data query server sends query statement; Inquiry Distributor obtains Query Result.Solve in the time of database processing data and can consume too much CPU, committed memory resource is large, in the time of database processing data, carry out data query operation to there will be inadequate resource and report an error or the query script very long problem that expends time in, reached data processing in database, inquiry be separated, the resource consumption of having isolated inquiry and having processed, committed memory resource is few, makes data query speed ensure sooner the effect of the stability of inquiry simultaneously.
Fig. 5 is according to the process flow diagram of the 5th embodiment of the method for data base querying processing of the present invention.As shown in Figure 5, the method for this data base querying processing comprises:
Step S501, by data processing server, to the first database executing data processing, wherein, the first database is stored on data processing server.
This step is with above-mentioned steps S101.
Step S502, is synchronized to the second database on data query server by the data in the first database, and wherein, querying server is for inquiring about data.
This step is with above-mentioned steps S102.
Step S503, inquires about the second database executing data by data query server.
This step is with above-mentioned steps S103.
Whether step S504, judge on data query server successful to the second data base querying.
Data query server is inquired about the second database executing data, may occur connecting or other inquiry errors, once there is similar mistake, can not obtain Query Result, inquires about unsuccessfully.By detecting in query script whether have error message, judge on data query server whether successful to the second data base querying.
Step S505, if unsuccessful to the second data base querying on data query server, choose data processing server the first database is inquired about.
If in all querying server executing data query script, detected error message in data query server, switch to executing data inquiry on data processing server.
Step S506, inquiry Distributor connection data processing server.
On data query server, revise the character string of connection server, by this operation, make to inquire about Distributor and be connected with data query server.
Step S507 obtains the information of data query on data processing server.
Step S508, by the information of data query, data processing server sends query statement.
Step S509, inquiry Distributor obtains Query Result.
The method of the data base querying processing providing in embodiments of the invention, the method by data processing server to the first database executing data processing; Data in the first database are synchronized to the second database on data query server; By data query server, the second database executing data is inquired about; Judge on data query server whether successful to the second data base querying; If unsuccessful to the second data base querying on data query server, choose data processing server the first database is inquired about; Inquiry Distributor connection data processing server; On data processing server, obtain the information of data query; By the information of data query, data processing server sends query statement; Inquiry Distributor obtains Query Result.Solve in the time of database processing data and can consume too much CPU, committed memory resource is large, in the time of database processing data, carry out data query operation to there will be inadequate resource and report an error or the query script very long problem that expends time in, reach in data query server executing data query script and occurred mistake, automatically switch to data processing server, ensured the effect of the stability of inquiry.
It should be noted that, can in the computer system such as one group of computer executable instructions, carry out in the step shown in the process flow diagram of accompanying drawing, and, although there is shown logical order in flow process, but in some cases, can carry out shown or described step with the order being different from herein.
Fig. 6 is according to the schematic diagram of the first embodiment of the device of data base querying processing of the present invention.As shown in Figure 6, the device of this data base querying processing comprises: processing unit 10, lock unit 20 and query unit 30.
Processing unit 10, for by data processing server to the first database executing data processing, wherein, the first database is stored on data processing server.
Lock unit 20, for the data of the first database being synchronized to the second database on data query server, wherein, querying server is for inquiring about data.
Query unit 30, for inquiring about the second database executing data by data query server.
The device of the data base querying processing providing in embodiments of the invention, this device adopts processing unit 10, for by data processing server to the first database executing data processing, wherein, the first database is stored on data processing server; Lock unit 20, for the data of the first database being synchronized to the second database on data query server, wherein, querying server is for inquiring about data; Query unit 30, for inquiring about the second database executing data by data query server.Solve in the time of database processing data and can consume too much CPU, committed memory resource is large, in the time of database processing data, carry out data query operation to there will be inadequate resource and report an error or the query script very long problem that expends time in, reached data processing in database, inquiry be separated, the resource consumption of having isolated inquiry and having processed, committed memory resource is few, makes data query speed ensure sooner the effect of the stability of inquiry simultaneously.
Fig. 7 is according to the schematic diagram of the second embodiment of the device of data base querying processing of the present invention.As shown in Figure 7, the device of this data base querying processing comprises: processing unit 10, lock unit 20 and query unit 30.Wherein query unit 30 comprises: judge module 301 and enquiry module 302.
The effect of processing unit 10, lock unit 20 and query unit 30 with in above-described embodiment, act on identically, do not repeat them here.
Judge module 301, for the priority that judges the first querying server whether higher than the priority of the second querying server.
Enquiry module 302, for the priority higher than the second querying server in the priority of the first querying server, by the first querying server to the second database executing data inquiry on the first querying server.Priority in the priority of the first querying server lower than the second querying server, by the second querying server to the second database executing data inquiry on the second querying server.
Fig. 8 is according to the schematic diagram of the 3rd embodiment of the device of data base querying processing of the present invention.As shown in Figure 8, the device of this data base querying processing comprises: processing unit 10, lock unit 20 and query unit 30.Wherein lock unit 20 comprises: calling module 201 and synchronization module 202.
The effect of processing unit 10, lock unit 20 and query unit 30 with in above-described embodiment, act on identically, do not repeat them here.
Calling module 201, for data query server calls synchronic command, wherein, synchronic command is for carrying out synchronously the data of the first database on data processing server.
Synchronization module 202, for being synchronized to the second database on data query server by operation synchronic command by the data of the first database.
Fig. 9 is according to the schematic diagram of the 4th embodiment of the device of data base querying processing of the present invention.As shown in Figure 9, the device of this data base querying processing comprises: processing unit 10, lock unit 20 and query unit 30.Wherein query unit 30 comprises: link block 303, the first acquisition module 304, sending module 305 and the second acquisition module 306.
The effect of processing unit 10, lock unit 20 and query unit 30 with in above-described embodiment, act on identically, do not repeat them here.
Link block 303, for inquiring about Distributor connection data querying server, wherein, inquiry Distributor is used for collecting all inquiry request information and Query Result.
The first acquisition module 304, for obtaining the information of data query on data query server.
Sending module 305, for by the information of data query, data query server sends query statement.
The second acquisition module 306, obtains Query Result for inquiring about Distributor.
Figure 10 is according to the schematic diagram of the 5th embodiment of the device of data base querying processing of the present invention.As shown in figure 10, the device of this data base querying processing comprises: processing unit 10, lock unit 20, query unit 30, judging unit 40, choose unit 50, linkage unit 60, the first acquiring unit 70, transmitting element 80 and second acquisition unit 90.
The effect of processing unit 10, lock unit 20 and query unit 30 with in above-described embodiment, act on identically, do not repeat them here.
Judging unit 40, whether successful to the second data base querying for judging on data query server.
Choose unit 50, on data query server in the unsuccessful situation of the second data base querying, choose data processing server the first database inquired about.
Linkage unit 60, for inquiring about Distributor connection data processing server.
The first acquiring unit 70, for obtaining the information of data query on data processing server.
Transmitting element 80, for by the information of data query, data processing server sends query statement.
Second acquisition unit 90, obtains Query Result for inquiring about Distributor.
The device of the data base querying processing providing in embodiments of the invention, this device adopts processing unit 10, for by data processing server to the first database executing data processing, wherein, the first database is stored on data processing server; Lock unit 20, for the data of the first database being synchronized to the second database on data query server, wherein, querying server is for inquiring about data; Query unit 30, for inquiring about the second database executing data by data query server; Judging unit 40, whether successful to the second data base querying for judging on data query server; Choose unit 50, on data query server in the unsuccessful situation of the second data base querying, choose data processing server the first database inquired about; Linkage unit 60, for inquiring about Distributor connection data processing server; The first acquiring unit 70, for obtaining the information of data query on data processing server; Transmitting element 80, for by the information of data query, data processing server sends query statement; Second acquisition unit 90, be used for inquiring about Distributor and obtain Query Result, solve in the time of database processing data and can consume too much CPU, committed memory resource is large, in the time of database processing data, carry out data query operation to there will be inadequate resource and report an error or the query script very long problem that expends time in, reach in data query server executing data query script and occurred mistake, automatically switched to data processing server, ensured the effect of the stability of inquiry.
Obviously, those skilled in the art should be understood that, above-mentioned of the present invention each module or each step can realize with general calculation element, they can concentrate on single calculation element, or be distributed on the network that multiple calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in memory storage and be carried out by calculation element, or they are made into respectively to each integrated circuit modules, or the multiple modules in them or step are made into single integrated circuit module to be realized.Like this, the present invention is not restricted to any specific hardware and software combination.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (10)

1. a data base querying disposal route, is characterized in that, comprising:
By data processing server, to the first database executing data processing, wherein, described the first database is stored on described data processing server;
Data in described the first database are synchronized to the second database on data query server, and wherein, described querying server is for inquiring about data; And
By described data query server, described the second database executing data is inquired about.
2. method according to claim 1, it is characterized in that, described data query server comprises multiple queries server, described multiple queries server comprises the first querying server and the second querying server, by described data query server, described the second database executing data inquiry is comprised:
Whether the priority that judges described the first querying server is higher than the priority of described the second querying server;
Priority in the priority of described the first querying server higher than described the second querying server, by described the first querying server to the second database executing data inquiry on described the first querying server; And
Priority in the priority of described the first querying server lower than described the second querying server, by described the second querying server to the second database executing data inquiry on described the second querying server.
3. method according to claim 1, is characterized in that, the second database that the data in described the first database are synchronized on data query server comprises:
Described data query server calls synchronic command, wherein, described synchronic command is for carrying out synchronously the data of described the first database on described data processing server; And
By moving described synchronic command, the data in described the first database are synchronized to described the second database on described data query server.
4. method according to claim 1, is characterized in that, by described data query server, the data in described the second database is inquired about and is comprised:
Inquiry Distributor connects described data query server, and wherein, described inquiry Distributor is used for collecting all inquiry request information and Query Result;
On described data query server, obtain the information of data query;
By the information of described data query, described data query server sends query statement; And
Inquiry Distributor obtains Query Result.
5. method according to claim 1, is characterized in that, after on described data query server, the data in described the second database being inquired about, described method also comprises:
Judge on described data query server whether successful to described the second data base querying;
If unsuccessful to described the second data base querying on described data query server, choose described data processing server described the first database is inquired about;
Inquiry Distributor connects described data processing server;
On described data processing server, obtain the information of data query;
By the information of described data query, described data processing server sends query statement; And
Inquiry Distributor obtains Query Result.
6. a data base querying treating apparatus, is characterized in that, comprising:
Processing unit, for by data processing server to the first database executing data processing, wherein, described the first database is stored on described data processing server;
Lock unit, for the data of described the first database being synchronized to the second database on data query server, wherein, described querying server is for inquiring about data; And
Query unit, for inquiring about described the second database executing data by described data query server.
7. device according to claim 6, is characterized in that, described data query server comprises multiple queries server, and described multiple queries server comprises the first querying server and the second querying server, and query unit comprises:
Judge module, for the priority that judges described the first querying server whether higher than the priority of described the second querying server; And
Enquiry module, for the priority higher than described the second querying server in the priority of described the first querying server, by described the first querying server to the second database executing data inquiry on described the first querying server; Priority in the priority of described the first querying server lower than described the second querying server, by described the second querying server to the second database executing data inquiry on described the second querying server.
8. device according to claim 6, is characterized in that, lock unit comprises:
Calling module, for described data query server calls synchronic command, wherein, described synchronic command is for carrying out synchronously the data of described the first database on described data processing server; And
Synchronization module, for being synchronized to described the second database on described data query server by moving described synchronic command by the data of described the first database.
9. device according to claim 6, is characterized in that, query unit comprises:
Link block, connects described data query server for inquiring about Distributor, and wherein, described inquiry Distributor is used for collecting all inquiry request information and Query Result;
The first acquisition module, for obtaining the information of data query on described data query server;
Sending module, for by the information of described data query, described data query server sends query statement; And
The second acquisition module, obtains Query Result for inquiring about Distributor.
10. device according to claim 6, is characterized in that, described device also comprises:
Judging unit, whether successful to described the second data base querying for judging on described data query server;
Choose unit, on described data query server in the unsuccessful situation of described the second data base querying, choose described data processing server described the first database inquired about;
Linkage unit, connects described data processing server for inquiring about Distributor;
The first acquiring unit, for obtaining the information of data query on described data processing server;
Transmitting element, for by the information of described data query, described data processing server sends query statement; And
Second acquisition unit, obtains Query Result for inquiring about Distributor.
CN201410450214.9A 2014-09-04 2014-09-04 Database query processing method and device Pending CN104166738A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410450214.9A CN104166738A (en) 2014-09-04 2014-09-04 Database query processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410450214.9A CN104166738A (en) 2014-09-04 2014-09-04 Database query processing method and device

Publications (1)

Publication Number Publication Date
CN104166738A true CN104166738A (en) 2014-11-26

Family

ID=51910551

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410450214.9A Pending CN104166738A (en) 2014-09-04 2014-09-04 Database query processing method and device

Country Status (1)

Country Link
CN (1) CN104166738A (en)

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105183614A (en) * 2015-11-03 2015-12-23 华夏银行股份有限公司 Database failure prediction method and device
CN105653652A (en) * 2015-12-28 2016-06-08 上海瀚银信息技术有限公司 Data synchronization method and system
CN105930324A (en) * 2015-10-26 2016-09-07 上海剑桥科技股份有限公司 Method and system for reading device data
CN105956210A (en) * 2016-07-14 2016-09-21 上海超橙科技有限公司 Data management method and equipment
CN106897303A (en) * 2015-12-18 2017-06-27 北京国双科技有限公司 Data query method and device
CN106933873A (en) * 2015-12-30 2017-07-07 中国移动通信集团上海有限公司 A kind of cross-platform data querying method and equipment
CN108256719A (en) * 2017-07-24 2018-07-06 平安科技(深圳)有限公司 Resource processing system and method
CN109033253A (en) * 2018-07-06 2018-12-18 中国电力财务有限公司 Data integrating method and device
CN109241092A (en) * 2018-10-15 2019-01-18 北京金山云网络技术有限公司 Data query method, system and computer equipment
CN111698227A (en) * 2020-05-28 2020-09-22 中国平安财产保险股份有限公司 Information synchronization management method, device, computer system and readable storage medium
CN112069178A (en) * 2020-08-31 2020-12-11 银盛支付服务股份有限公司 Device and method for pre-synchronization and query performance of unstructured database
CN113168405A (en) * 2019-01-23 2021-07-23 株式会社日立制作所 Database management service providing system

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1928873A (en) * 2006-09-25 2007-03-14 华为技术有限公司 System and method for database access for implementing load sharing
CN101980187A (en) * 2010-10-13 2011-02-23 中兴通讯股份有限公司 Data warehousing method and device
CN102073697A (en) * 2010-12-28 2011-05-25 中兴通讯股份有限公司 Data processing method and data processing device
CN102750377A (en) * 2012-06-21 2012-10-24 深圳市谷米科技有限公司 Massive data storage and retrieval method
CN103177035A (en) * 2011-12-26 2013-06-26 中国银联股份有限公司 Data query device and data query method in data base
CN103258054A (en) * 2013-05-31 2013-08-21 闫朝升 Method and device for processing data

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1928873A (en) * 2006-09-25 2007-03-14 华为技术有限公司 System and method for database access for implementing load sharing
CN101980187A (en) * 2010-10-13 2011-02-23 中兴通讯股份有限公司 Data warehousing method and device
CN102073697A (en) * 2010-12-28 2011-05-25 中兴通讯股份有限公司 Data processing method and data processing device
CN103177035A (en) * 2011-12-26 2013-06-26 中国银联股份有限公司 Data query device and data query method in data base
CN102750377A (en) * 2012-06-21 2012-10-24 深圳市谷米科技有限公司 Massive data storage and retrieval method
CN103258054A (en) * 2013-05-31 2013-08-21 闫朝升 Method and device for processing data

Cited By (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105930324A (en) * 2015-10-26 2016-09-07 上海剑桥科技股份有限公司 Method and system for reading device data
CN105183614A (en) * 2015-11-03 2015-12-23 华夏银行股份有限公司 Database failure prediction method and device
CN106897303B (en) * 2015-12-18 2020-09-15 北京国双科技有限公司 Data query method and device
CN106897303A (en) * 2015-12-18 2017-06-27 北京国双科技有限公司 Data query method and device
CN105653652A (en) * 2015-12-28 2016-06-08 上海瀚银信息技术有限公司 Data synchronization method and system
CN105653652B (en) * 2015-12-28 2019-07-05 上海瀚银信息技术有限公司 A kind of method of data synchronization and system
CN106933873A (en) * 2015-12-30 2017-07-07 中国移动通信集团上海有限公司 A kind of cross-platform data querying method and equipment
CN105956210A (en) * 2016-07-14 2016-09-21 上海超橙科技有限公司 Data management method and equipment
CN108256719A (en) * 2017-07-24 2018-07-06 平安科技(深圳)有限公司 Resource processing system and method
WO2019019696A1 (en) * 2017-07-24 2019-01-31 平安科技(深圳)有限公司 Resource processing system and method, server and storage medium
CN109033253A (en) * 2018-07-06 2018-12-18 中国电力财务有限公司 Data integrating method and device
CN109241092A (en) * 2018-10-15 2019-01-18 北京金山云网络技术有限公司 Data query method, system and computer equipment
CN113168405A (en) * 2019-01-23 2021-07-23 株式会社日立制作所 Database management service providing system
CN111698227A (en) * 2020-05-28 2020-09-22 中国平安财产保险股份有限公司 Information synchronization management method, device, computer system and readable storage medium
CN111698227B (en) * 2020-05-28 2022-07-22 中国平安财产保险股份有限公司 Information synchronization management method, device, computer system and readable storage medium
CN112069178A (en) * 2020-08-31 2020-12-11 银盛支付服务股份有限公司 Device and method for pre-synchronization and query performance of unstructured database

Similar Documents

Publication Publication Date Title
CN104166738A (en) Database query processing method and device
CN110096336B (en) Data monitoring method, device, equipment and medium
CN110119292B (en) System operation parameter query method, matching method, device and node equipment
EP2948875B1 (en) Method and system for using a recursive event listener on a node in hierarchical data structure
CN111970198A (en) Service routing method, device, electronic equipment and medium
JP2007241394A (en) Division processing management device, division processing management system, arithmetic processing execution system and division processing management method
US10698890B2 (en) Dual overlay query processing
EP3869434A1 (en) Blockchain-based data processing method and apparatus, device, and medium
CN111143382A (en) Data processing method, system and computer readable storage medium
CN110727738B (en) Global routing system based on data fragmentation, electronic equipment and storage medium
CN101964763A (en) Message handling method
US20060156312A1 (en) Method and apparatus for managing an event processing system
CN107784085B (en) Data list exporting method and terminal thereof
CN104618388A (en) Quick registration and login method and corresponding reset server and information server
CN116611411A (en) Business system report generation method, device, equipment and storage medium
CN110928900B (en) Multi-table data query method, device, terminal and computer storage medium
CN114679349A (en) Data communication method and device
CN112364005B (en) Data synchronization method, device, computer equipment and storage medium
CN106202456B (en) Send the method and device of picture
CN103268264B (en) A kind of multi event synchronization RFID middleware system of low coupling and its implementation
CN109586933A (en) Acquisition methods, system and the server of conferencing resource
US20210377718A1 (en) Pattern affinity for discovery
CN108809763B (en) Network performance parameter acquisition method, terminal device and storage medium
CN111078736A (en) Data aggregation processing method and device, terminal and storage medium
CN109818767B (en) Method and device for adjusting Redis cluster capacity and storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20141126