CN110597849B - Data query method and device - Google Patents

Data query method and device Download PDF

Info

Publication number
CN110597849B
CN110597849B CN201810516031.0A CN201810516031A CN110597849B CN 110597849 B CN110597849 B CN 110597849B CN 201810516031 A CN201810516031 A CN 201810516031A CN 110597849 B CN110597849 B CN 110597849B
Authority
CN
China
Prior art keywords
database
cache column
query
database tables
data
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.)
Active
Application number
CN201810516031.0A
Other languages
Chinese (zh)
Other versions
CN110597849A (en
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 CN201810516031.0A priority Critical patent/CN110597849B/en
Publication of CN110597849A publication Critical patent/CN110597849A/en
Application granted granted Critical
Publication of CN110597849B publication Critical patent/CN110597849B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a data query method and a data query device.A database table added with at least one cache column is generated in advance, and a multi-table combined query result is cached in the at least one cache column; after receiving the multi-table joint query request, querying in a cache column of the database table to obtain a multi-table joint query result corresponding to the multi-table joint query request. Compared with the prior art that a plurality of database tables need to be queried, the data query method and the data query device provided by the invention can obtain a query result by querying one database table, thereby greatly improving the query efficiency, reducing the waiting time of a user and improving the user experience.

Description

Data query method and device
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a data query method and apparatus.
Background
The database is an organized and sharable data set which is stored in a computer for a long time, the data in the database is organized, described and stored together in a certain data model, and a user can query, retrieve, process and the like the data in the database in a certain range.
In a relational database management system, the relationships between data at table build time may be indeterminate, and all information for an entity is typically stored in a table. When data is retrieved, the information of different entities stored in the tables is inquired through table connection operation. The multi-table combined query method brings great flexibility to data query operation, and a user can add new data types at any time and only needs to create new tables for different entities without performing additional operation on the database.
However, with the increasing popularity and deep application of information systems, the amount of generated business logic data information shows explosive growth, and the coupling degree between data becomes higher and higher. The number of relational tables represented in a relational database is increasing, and the association between data tables becomes more complicated. In addition, the amount of data in a single table is increasing. At present, aiming at a multi-table joint query request of a user, a mode of adding an index to perform multi-table joint query is mostly adopted to query data, but the mode has very low query efficiency, increases the waiting time of the user and reduces the user experience.
Disclosure of Invention
In view of the above problems, the present invention is proposed to provide a data query method and apparatus that overcomes or at least partially solves the above problems, and the specific solution is as follows
A method of data query, the method comprising:
generating a database table added with at least one cache column in advance, wherein a multi-table combined query result is cached in the at least one cache column;
receiving a multi-table combined query request;
and querying in a cache column of the database table to obtain a multi-table joint query result corresponding to the multi-table joint query request.
Optionally, the pre-generating a database table added with at least one cache column specifically includes:
determining at least two database tables and a Map mapping table between the at least two database tables;
performing multi-table joint query on the at least two database tables by adopting a multi-table joint query mode based on the Map mapping table to obtain a multi-table joint query result of at least one category;
selecting a target database table from the at least two database tables;
adding at least one cache column into the target database table to generate a database table added with at least one cache column, caching the multi-table joint query result of at least one category into at least one cache column, and caching the multi-table joint query result of one category in each cache column.
Optionally, the method further includes:
monitoring the at least two database tables and the data updating operation of the Map mapping table between the at least two database tables by adopting a preset period;
and if the data updating operation of the at least two database tables and the Map mapping table between the at least two database tables is monitored, triggering the data updating operation of the at least one cache column in the database table added with the at least one cache column.
Optionally, the method further includes:
and when data updating operation is carried out on the at least two database tables and the Map mapping table between the at least two database tables, calling a pre-created storage process related to join operation to update the data of the at least one cache column in the database table added with the at least one cache column.
Optionally, after obtaining the multi-table join query result corresponding to the multi-table join query request, the method further includes:
and feeding back a multi-table joint query result corresponding to the multi-table joint query request.
A data query device, the device comprising:
the database table generating unit is used for generating a database table added with at least one cache column in advance, and a multi-table combined query result is cached in the at least one cache column;
the receiving unit is used for receiving the multi-table combined query request;
and the query unit is used for querying in the cache column of the database table to obtain a multi-table joint query result corresponding to the multi-table joint query request.
Optionally, the database table generating unit is specifically configured to:
determining at least two database tables and a Map mapping table between the at least two database tables;
performing multi-table joint query on the at least two database tables by adopting a multi-table joint query mode based on the Map mapping table to obtain a multi-table joint query result of at least one category;
selecting a target database table from the at least two database tables;
adding at least one cache column into the target database table to generate a database table added with at least one cache column, caching the multi-table joint query result of at least one category into at least one cache column, and caching the multi-table joint query result of one category in each cache column.
Optionally, the apparatus further comprises:
the monitoring unit is used for monitoring the at least two database tables and the data updating operation of the Map mapping table between the at least two database tables by adopting a preset period;
the data updating unit is used for triggering data updating operation on at least one cache column in the database table added with at least one cache column if the data updating operation of the at least two database tables and a Map mapping table between the at least two database tables is monitored;
the calling unit is used for calling a pre-created storage process related to join operation to update the data of the at least one cache column in the database table added with the at least one cache column when data updating operation is carried out on the at least two database tables and the Map mapping table between the at least two database tables;
and the sending unit is used for feeding back the multi-table joint query result corresponding to the multi-table joint query request after the multi-table joint query result corresponding to the multi-table joint query request is obtained.
A storage medium having stored thereon a program which, when executed by a processor, implements a data query method as previously described.
A processor for running a program, wherein the program when running performs the data query method as described above.
By means of the technical scheme, the data query method and the data query device provided by the invention have the advantages that the database table added with at least one cache column is generated in advance, and the multi-table combined query result is cached in the at least one cache column; after receiving the multi-table joint query request, querying in a cache column of the database table to obtain a multi-table joint query result corresponding to the multi-table joint query request. Compared with the prior art that a plurality of database tables need to be queried, the data query method and the data query device provided by the invention can obtain a query result by querying one database table, thereby greatly improving the query efficiency, reducing the waiting time of a user and improving the user experience.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings. In the drawings:
fig. 1 is a schematic specific flowchart of a data query method according to an embodiment of the present invention;
fig. 2 shows a specific structural diagram of a data query device according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
Referring to fig. 1, fig. 1 is a schematic flowchart illustrating a data query method according to an embodiment of the present invention, where the method includes the following steps:
step S100, generating a database table added with at least one cache column in advance, wherein a multi-table combined query result is cached in the at least one cache column;
the specific implementation flow of the step is as follows:
determining at least two database tables and a Map mapping table between the at least two database tables;
performing multi-table joint query on the at least two database tables by adopting a multi-table joint query mode based on the Map mapping table to obtain a multi-table joint query result of at least one category;
selecting a target database table from the at least two database tables;
adding at least one cache column into the target database table to generate a database table added with at least one cache column, caching the multi-table joint query result of at least one category into at least one cache column, and caching the multi-table joint query result of one category in each cache column.
Step S110, receiving a multi-table combined query request;
the multi-table combined query request is sent by a user through a query client, and the query client can be a computer, a mobile phone, a tablet computer and other terminal equipment.
And step S120, inquiring in the cache column of the database table to obtain a multi-table joint inquiry result corresponding to the multi-table joint inquiry request.
It should be noted that after obtaining the multi-table joint query result corresponding to the multi-table joint query request, the multi-table joint query result corresponding to the multi-table joint query request may be actively fed back to the query client that sends the multi-table joint query request for the user to view, or after receiving the query result obtaining request sent by the query client, the multi-table joint query result corresponding to the multi-table joint query request may be fed back to the query client.
In the data query method provided by this embodiment, a database table added with at least one cache column is generated in advance, and a multi-table combined query result is cached in the at least one cache column; after receiving the multi-table joint query request, querying in a cache column of the database table to obtain a multi-table joint query result corresponding to the multi-table joint query request. Compared with the prior art that a plurality of database tables need to be queried, the data query method provided by the embodiment can obtain the query result by querying one database table, thereby greatly improving the query efficiency, reducing the waiting time of a user and improving the user experience.
The embodiment of the present invention describes the data query method in detail by the following examples, which are as follows:
the two database tables with the association relationship are determined to be a student table (shown in table 1) and a subject table (shown in table 2), the student table and the subject table are mapped through a Map (shown in table 3), and each student respectively learns which subjects need to be jointly queried to obtain the student table, the subject table and the Map.
TABLE 1 student watch
Figure BDA0001673151200000051
Figure BDA0001673151200000061
TABLE 2 disciplinary table
Figure BDA0001673151200000062
Table 3 student table and subject table mapping table
Figure BDA0001673151200000063
Taking as an example the inquiry about which disciplines the xiaoming is learning, firstly, look up table 1 to determine that the student ID corresponding to the xiaoming is 3, then look up table 3 to determine that the discipline ID corresponding to the student ID 3 is 101, 102, 103, 107, 108, 109, finally, look up table 2 to determine that the discipline ID corresponding to the discipline ID 101 is a Chinese, the discipline ID corresponding to the discipline ID 102 is a math, the discipline ID corresponding to the discipline ID 103 is an English, the discipline ID corresponding to the discipline ID 107 is a political, the discipline ID corresponding to the discipline ID 108 is a history, the discipline ID corresponding to the discipline ID 109 is a geography, and finally the disciplines the xiaoming is a Chinese, a math, English, politics, history and geography. The method is characterized in that the subjects being learned by other students are queried in a mode of inquiring about the subjects being learned by the student, specifically, the subjects being learned by Zhang three are Chinese, mathematics, English, physics, chemistry and biology, the subjects being learned by Li four are Chinese, mathematics, English, politics, history and geography, and the subjects being learned by Xiaohong are Chinese, mathematics, English, physics, chemistry and biology.
And adding a cache column in the student table to store the subject that each student is learning, storing the queried subject that each student is learning into the cache column, and generating the student table with the cache column as shown in table 4.
Table 4 student table with cache column
Figure BDA0001673151200000071
Therefore, when receiving a multi-table combined query request which indicates that the subject to be learned by Xiaoming is learned and sent by a user, only the query table 4 is needed to learn that the subject to be learned by Xiaoming is Chinese, mathematics, English, politics, history and geography, and compared with the method that when receiving the multi-table combined query request which indicates that the subject to be learned by Xiaoming is learned and sent by the user, the method for querying the subject to be learned by adopting the query tables 1, 2 and 3 greatly improves the query efficiency, reduces the waiting time of the user and improves the user experience.
It should be noted that, in the execution process, the data query method provided by the present invention further includes:
monitoring the at least two database tables and the data updating operation of the Map mapping table between the at least two database tables by adopting a preset period;
and if the data updating operation of the at least two database tables and the Map mapping table between the at least two database tables is monitored, triggering the data updating operation of the at least one cache column in the database table added with the at least one cache column.
Alternatively, the first and second electrodes may be,
and when data updating operation is carried out on the at least two database tables and the Map mapping table between the at least two database tables, calling a pre-created storage process related to join operation to update the data of the at least one cache column in the database table added with the at least one cache column.
It should be noted that join operations may include addition, deletion, modification, query, etc. of data.
Through the two modes, the data of the at least one cache column in the database table added with the at least one cache column can be ensured to be always in the latest state, and the query accuracy is improved.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a data query apparatus according to an embodiment of the present invention, where the apparatus includes:
a database table generating unit 10, configured to generate a database table added with at least one cache column in advance, where a multi-table joint query result is cached in the at least one cache column;
a receiving unit 11, configured to receive a multi-table join query request;
and the query unit 12 is configured to query the cache column of the database table to obtain a multi-table joint query result corresponding to the multi-table joint query request.
Optionally, the database table generating unit is specifically configured to:
determining at least two database tables and a Map mapping table between the at least two database tables;
performing multi-table joint query on the at least two database tables by adopting a multi-table joint query mode based on the Map mapping table to obtain a multi-table joint query result of at least one category;
selecting a target database table from the at least two database tables;
adding at least one cache column into the target database table to generate a database table added with at least one cache column, caching the multi-table joint query result of at least one category into at least one cache column, and caching the multi-table joint query result of one category in each cache column.
Optionally, the apparatus further comprises:
the monitoring unit is used for monitoring the at least two database tables and the data updating operation of the Map mapping table between the at least two database tables by adopting a preset period;
the data updating unit is used for triggering data updating operation on at least one cache column in the database table added with at least one cache column if the data updating operation of the at least two database tables and a Map mapping table between the at least two database tables is monitored;
the calling unit is used for calling a pre-created storage process related to join operation to update the data of the at least one cache column in the database table added with the at least one cache column when data updating operation is carried out on the at least two database tables and the Map mapping table between the at least two database tables;
and the sending unit is used for feeding back the multi-table joint query result corresponding to the multi-table joint query request after the multi-table joint query result corresponding to the multi-table joint query request is obtained.
It should be noted that specific function implementation of each unit is already described in detail in the method embodiment, and this embodiment is not described again.
The data inquiry device comprises a processor and a memory, wherein the database table generating unit, the receiving unit, the inquiry unit, the sending unit and the like are stored in the memory as program units, and the processor executes the program units stored in the memory to realize corresponding functions.
The processor comprises a kernel, and the kernel calls the corresponding program unit from the memory. The kernel can be set to be one or more than one, the multi-table combined query efficiency is improved by adjusting kernel parameters, the waiting time of a user is reduced, and the user experience is improved.
The memory may include volatile memory in a computer readable medium, Random Access Memory (RAM) and/or nonvolatile memory such as Read Only Memory (ROM) or flash memory (flash RAM), and the memory includes at least one memory chip.
An embodiment of the present invention provides a storage medium on which a program is stored, the program implementing the data query method when executed by a processor.
The embodiment of the invention provides a processor, which is used for running a program, wherein the data query method is executed when the program runs.
The embodiment of the invention provides equipment, which comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the processor executes the program and realizes the following steps:
generating a database table added with at least one cache column in advance, wherein a multi-table combined query result is cached in the at least one cache column;
receiving a multi-table combined query request;
and querying in a cache column of the database table to obtain a multi-table joint query result corresponding to the multi-table joint query request.
Optionally, the pre-generating a database table added with at least one cache column specifically includes:
determining at least two database tables and a Map mapping table between the at least two database tables;
performing multi-table joint query on the at least two database tables by adopting a multi-table joint query mode based on the Map mapping table to obtain a multi-table joint query result of at least one category;
selecting a target database table from the at least two database tables;
adding at least one cache column into the target database table to generate a database table added with at least one cache column, caching the multi-table joint query result of at least one category into at least one cache column, and caching the multi-table joint query result of one category in each cache column.
Optionally, the method further includes:
monitoring the at least two database tables and the data updating operation of the Map mapping table between the at least two database tables by adopting a preset period;
and if the data updating operation of the at least two database tables and the Map mapping table between the at least two database tables is monitored, triggering the data updating operation of the at least one cache column in the database table added with the at least one cache column.
Optionally, the method further includes:
and when data updating operation is carried out on the at least two database tables and the Map mapping table between the at least two database tables, calling a pre-created storage process related to join operation to update the data of the at least one cache column in the database table added with the at least one cache column.
Optionally, after obtaining the multi-table join query result corresponding to the multi-table join query request, the method further includes:
and feeding back a multi-table joint query result corresponding to the multi-table joint query request.
The device herein may be a server, a PC, a PAD, a mobile phone, etc.
The present application further provides a computer program product adapted to perform a program for initializing the following method steps when executed on a data processing device:
generating a database table added with at least one cache column in advance, wherein a multi-table combined query result is cached in the at least one cache column;
receiving a multi-table combined query request;
and querying in a cache column of the database table to obtain a multi-table joint query result corresponding to the multi-table joint query request.
Optionally, the pre-generating a database table added with at least one cache column specifically includes:
determining at least two database tables and a Map mapping table between the at least two database tables;
performing multi-table joint query on the at least two database tables by adopting a multi-table joint query mode based on the Map mapping table to obtain a multi-table joint query result of at least one category;
selecting a target database table from the at least two database tables;
adding at least one cache column into the target database table to generate a database table added with at least one cache column, caching the multi-table joint query result of at least one category into at least one cache column, and caching the multi-table joint query result of one category in each cache column.
Optionally, the method further includes:
monitoring the at least two database tables and the data updating operation of the Map mapping table between the at least two database tables by adopting a preset period;
and if the data updating operation of the at least two database tables and the Map mapping table between the at least two database tables is monitored, triggering the data updating operation of the at least one cache column in the database table added with the at least one cache column.
Optionally, the method further includes:
and when data updating operation is carried out on the at least two database tables and the Map mapping table between the at least two database tables, calling a pre-created storage process related to join operation to update the data of the at least one cache column in the database table added with the at least one cache column.
Optionally, after obtaining the multi-table join query result corresponding to the multi-table join query request, the method further includes:
and feeding back a multi-table joint query result corresponding to the multi-table joint query request.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). The memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include transitory computer readable media (trans-entity media) such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above are merely examples of the present application and are not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (8)

1. A method for data query, the method comprising:
generating a database table added with at least one cache column in advance, wherein a multi-table combined query result is cached in the at least one cache column;
receiving a multi-table combined query request;
querying in a cache column of the database table to obtain a multi-table joint query result corresponding to the multi-table joint query request;
the pre-generating of the database table added with at least one cache column specifically includes:
determining at least two database tables and a Map mapping table between the at least two database tables;
performing multi-table joint query on the at least two database tables by adopting a multi-table joint query mode based on the Map mapping table to obtain a multi-table joint query result of at least one category;
selecting a target database table from the at least two database tables;
adding at least one cache column into the target database table to generate a database table added with at least one cache column, caching the multi-table joint query result of at least one category into at least one cache column, and caching the multi-table joint query result of one category in each cache column.
2. The method of claim 1, further comprising:
monitoring the at least two database tables and the data updating operation of the Map mapping table between the at least two database tables by adopting a preset period;
and if the data updating operation of the at least two database tables and the Map mapping table between the at least two database tables is monitored, triggering the data updating operation of the at least one cache column in the database table added with the at least one cache column.
3. The method of claim 1, further comprising:
and when data updating operation is carried out on the at least two database tables and the Map mapping table between the at least two database tables, calling a pre-created storage process related to join operation to update the data of the at least one cache column in the database table added with the at least one cache column.
4. The method according to any one of claims 1 to 3, wherein after the obtaining of the multi-table join query result corresponding to the multi-table join query request, the method further comprises:
and feeding back a multi-table joint query result corresponding to the multi-table joint query request.
5. A data query apparatus, characterized in that the apparatus comprises:
the database table generating unit is used for generating a database table added with at least one cache column in advance, and a multi-table combined query result is cached in the at least one cache column;
the receiving unit is used for receiving the multi-table combined query request;
the query unit is used for querying in a cache column of the database table to obtain a multi-table joint query result corresponding to the multi-table joint query request;
the database table generation unit is specifically configured to:
determining at least two database tables and a Map mapping table between the at least two database tables;
performing multi-table joint query on the at least two database tables by adopting a multi-table joint query mode based on the Map mapping table to obtain a multi-table joint query result of at least one category;
selecting a target database table from the at least two database tables;
adding at least one cache column into the target database table to generate a database table added with at least one cache column, caching the multi-table joint query result of at least one category into at least one cache column, and caching the multi-table joint query result of one category in each cache column.
6. The apparatus of claim 5, further comprising:
the monitoring unit is used for monitoring the at least two database tables and the data updating operation of the Map mapping table between the at least two database tables by adopting a preset period;
the data updating unit is used for triggering data updating operation on at least one cache column in the database table added with at least one cache column if the data updating operation of the at least two database tables and a Map mapping table between the at least two database tables is monitored;
the calling unit is used for calling a pre-created storage process related to join operation lookup to update the data of the at least one cache column in the database table added with the at least one cache column when data updating operation is carried out on the at least two database tables and the Map mapping table between the at least two database tables;
and the sending unit is used for feeding back the multi-table joint query result corresponding to the multi-table joint query request after the multi-table joint query result corresponding to the multi-table joint query request is obtained.
7. A storage medium on which a program is stored, the program implementing the data query method according to any one of claims 1 to 4 when executed by a processor.
8. A processor for running a program, wherein the program when running performs the data query method of any one of claims 1 to 4.
CN201810516031.0A 2018-05-25 2018-05-25 Data query method and device Active CN110597849B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810516031.0A CN110597849B (en) 2018-05-25 2018-05-25 Data query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810516031.0A CN110597849B (en) 2018-05-25 2018-05-25 Data query method and device

Publications (2)

Publication Number Publication Date
CN110597849A CN110597849A (en) 2019-12-20
CN110597849B true CN110597849B (en) 2022-03-22

Family

ID=68848749

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810516031.0A Active CN110597849B (en) 2018-05-25 2018-05-25 Data query method and device

Country Status (1)

Country Link
CN (1) CN110597849B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111708848B (en) * 2020-06-12 2024-02-23 北京思特奇信息技术股份有限公司 Data query method, system and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567329A (en) * 2010-12-15 2012-07-11 金蝶软件(中国)有限公司 Data query method and data query system
WO2016112502A1 (en) * 2015-01-14 2016-07-21 华为技术有限公司 Method, apparatus and computing device for storing query result
CN107273506A (en) * 2017-06-19 2017-10-20 西安电子科技大学 A kind of method of database multi-list conjunctive query
CN108038135A (en) * 2017-11-21 2018-05-15 平安科技(深圳)有限公司 Electronic device, the method for multilist correlation inquiry and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7062481B2 (en) * 2001-09-28 2006-06-13 Ncr Corp. Eliminating group-by operations in a join plan
CN103020115A (en) * 2012-11-13 2013-04-03 深圳市同洲电子股份有限公司 Data caching method, cache server and system
CN104112008A (en) * 2014-07-16 2014-10-22 深圳市国泰安信息技术有限公司 Multi-table data association inquiry optimizing method and device
US10521425B2 (en) * 2016-08-31 2019-12-31 Sap Se Generating faster and efficient database query execution plans
CN107609091B (en) * 2017-09-08 2020-10-27 国云科技股份有限公司 Method for realizing cross-database multi-table combined query system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102567329A (en) * 2010-12-15 2012-07-11 金蝶软件(中国)有限公司 Data query method and data query system
WO2016112502A1 (en) * 2015-01-14 2016-07-21 华为技术有限公司 Method, apparatus and computing device for storing query result
CN107273506A (en) * 2017-06-19 2017-10-20 西安电子科技大学 A kind of method of database multi-list conjunctive query
CN108038135A (en) * 2017-11-21 2018-05-15 平安科技(深圳)有限公司 Electronic device, the method for multilist correlation inquiry and storage medium

Also Published As

Publication number Publication date
CN110597849A (en) 2019-12-20

Similar Documents

Publication Publication Date Title
US20200142860A1 (en) Caseless file lookup in a distributed file system
CN108932257B (en) Multi-dimensional data query method and device
US8082258B2 (en) Updating an inverted index in a real time fashion
US20200257450A1 (en) Data hierarchical storage and hierarchical query method and apparatus
US8977646B2 (en) Leveraging graph databases in a federated database system
CN102725755B (en) Method and system of file access
CN108205577B (en) Array construction method, array query method, device and electronic equipment
CN107704202B (en) Method and device for quickly reading and writing data
CN106407303A (en) Data storage method and apparatus, and data query method and apparatus
CN107103011B (en) Method and device for realizing terminal data search
CN111797134A (en) Data query method and device of distributed database and storage medium
CN108345433A (en) For maximumlly can duplicate removal memory method, storage system and product
CN114840487A (en) Metadata management method and device for distributed file system
CN110597849B (en) Data query method and device
US8239391B2 (en) Hierarchical merging for optimized index
CN109977317B (en) Data query method and device
CN108959381B (en) Data management method and device and electronic equipment
CN112579633A (en) Data retrieval method, device, equipment and storage medium
CN111125087B (en) Data storage method and device
CN110837499B (en) Data access processing method, device, electronic equipment and storage medium
US9230011B1 (en) Index-based querying of archived data sets
US10114864B1 (en) List element query support and processing
US20170364454A1 (en) Method, apparatus, and computer program stored in computer readable medium for reading block in database system
CN112434189A (en) Data query method, device and equipment
CN107180052A (en) One kind provides document updating method trusty

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
GR01 Patent grant
GR01 Patent grant