CN108268538A - Database aggregation processing method and device - Google Patents
Database aggregation processing method and device Download PDFInfo
- Publication number
- CN108268538A CN108268538A CN201611265836.XA CN201611265836A CN108268538A CN 108268538 A CN108268538 A CN 108268538A CN 201611265836 A CN201611265836 A CN 201611265836A CN 108268538 A CN108268538 A CN 108268538A
- Authority
- CN
- China
- Prior art keywords
- index
- equivalent
- aggregation table
- dimension
- querying condition
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
- G06F16/2425—Iterative querying; Query formulation based on the results of a preceding query
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/245—Query processing
- G06F16/2453—Query optimisation
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
This application discloses a kind of database aggregation processing method and devices.This method includes:The dimension and index in the querying condition for inquiring database are obtained, wherein, index is the content of inquiry, and dimension is the restrictive condition of limitation inquiry content;The corresponding equivalent index of each index in querying condition is searched, wherein, equivalent index is the index in Aggregation Table, and Aggregation Table is the table being polymerize to original tables of data;For the equivalent index found, judge whether include dimension in the Aggregation Table where equivalent index;And in the case where the judgment result is yes, it is inquired in Aggregation Table using equivalent index and dimension, and returns to the result obtained after inquiry.By the application, solve the problems, such as to carry out in the database in the relevant technologies less efficient during data query.
Description
Technical field
This application involves field of database query technology, in particular to a kind of database aggregation processing method and dress
It puts.
Background technology
In existing product, many data can be recorded in the original tables of data of front end, therefore lead to original data
Table is too big.When carrying out data query in original tables of data, it can lead to that performance cost is larger, query process is slow, inquiry
It is less efficient.To accelerate the data query of front end, it will usually be accelerated by prepolymerization table.However work as and use these pre-polymerizations
It is to need all internal indicators on prepolymerization table being presented to front end, front end caller needs basis when closing the index on table
Index in the raw data base selective goal from all internal indicators on prepolymerization table, then according to the index of selection pre-
It is inquired on Aggregation Table, whole process is cumbersome, less efficient.
For it is less efficient when carrying out data query in the relevant technologies in the database the problem of, not yet propose at present effective
Solution.
Invention content
The main purpose of the application is to provide a kind of database aggregation processing method and device, to solve in the relevant technologies
The problem of less efficient during data query is carried out in the database.
To achieve these goals, according to the one side of the application, a kind of database aggregation processing method is provided.It should
Method includes:The dimension and index in the querying condition for inquiring database are obtained, wherein, index is the content of inquiry, is tieed up
Spend the restrictive condition for limitation inquiry content;The corresponding equivalent index of each index in querying condition is searched, wherein, equivalent index
For the index in Aggregation Table, Aggregation Table is the table being polymerize to original tables of data;For the equivalent index found,
Judge whether include dimension in the Aggregation Table where equivalent index;And in the case where the judgment result is yes, referred to using equivalence
Mark and dimension are inquired in Aggregation Table, and return to the result obtained after inquiry.
Further, in the case that an index corresponds to multiple equivalent indexs in querying condition, using equivalent index and
Dimension carries out inquiry in Aggregation Table and includes:The Aggregation Table data volume expense where equivalent index is selected from multiple equivalent indexs
Minimum equivalent index;It is inquired in the Aggregation Table of data volume expense minimum using equivalent index and dimension.
Further, in the case that an index corresponds to multiple equivalent indexs in querying condition, using equivalent index and
Dimension carries out inquiry in Aggregation Table and includes:Determine the Aggregation Table data volume expense where multiple equivalent indexs;By multiple equivalences
Aggregation Table where index is ranked up from small to large according to data volume expense;Sentence since the Aggregation Table of data volume expense minimum
The disconnected dimension for whether including querying condition;In the case where the judgment result is yes, in the Aggregation Table of data volume expense minimum into
Row inquiry;In the case where judging result is no, judge whether include dimension in next Aggregation Table again successively.
Further, in querying condition is searched after the corresponding equivalent index of each index, this method further includes:If not
The index of equivalent index is found, is inquired in original tables of data using the index for not finding equivalent index.
Further, the corresponding equivalent index of index is preconfigured, and the corresponding index of equivalent index is equal.
Further, this method is applied in enquiring component.
To achieve these goals, according to the another aspect of the application, a kind of database polymerization processing apparatus is provided.It should
Device includes:Acquiring unit, for obtaining dimension and index in the querying condition for inquiring database, wherein, index is
The content of inquiry, dimension are the restrictive condition of limitation inquiry content;Searching unit, for searching each index pair in querying condition
The equivalent index answered, wherein, equivalent index is the index in Aggregation Table, and Aggregation Table is is polymerize to obtain to original tables of data
Table;Judging unit, for for the equivalent index found, judging whether include dimension in the Aggregation Table where equivalent index
Degree;And first query unit, in the case where the judgment result is yes, using equivalent index and dimension in Aggregation Table into
Row inquiry, and return to the result obtained after inquiry.
Further, in the case that an index corresponds to multiple equivalent indexs in querying condition, the first query unit packet
It includes:Selecting module, for selecting the equivalence of the Aggregation Table data volume expense minimum where equivalent index from multiple equivalent indexs
Index;First enquiry module, for being inquired in the Aggregation Table of data volume expense minimum using equivalent index and dimension.
Further, in the case that an index corresponds to multiple equivalent indexs in querying condition, the first query unit packet
It includes:Determining module, for determining the Aggregation Table data volume expense where multiple equivalent indexs;Sorting module, for will be multiple etc.
Aggregation Table where value index is ranked up from small to large according to data volume expense;First judgment module, for being opened from data volume
The minimum Aggregation Table of pin starts to judge whether the dimension for including querying condition;Second enquiry module, for being yes in judging result
In the case of, it is inquired in the Aggregation Table of data volume expense minimum;Second judgment module, for be no in judging result
In the case of, judge whether include dimension in next Aggregation Table again successively.
Further, which further includes:Second query unit, it is corresponding for index each in querying condition is searched
After equivalent index, if not finding the index of equivalent index, using not finding the index of equivalent index in original data
It is inquired in table.
By the application, using following steps:The dimension and index in the querying condition for inquiring database are obtained,
In, index is the content of inquiry, and dimension is the restrictive condition of limitation inquiry content;It is corresponding to search each index in querying condition
Equivalent index, wherein, equivalent index is the index in Aggregation Table, and Aggregation Table is what original tables of data was polymerize
Table;For the equivalent index found, judge whether include dimension in the Aggregation Table where equivalent index;And in judging result
In the case of being, inquired in Aggregation Table using equivalent index and dimension, and return inquiry after obtain as a result, solve
The problem of less efficient during data query is carried out in the database in the relevant technologies.And then reached promotion in the database into
The effect of the efficiency of row data query.
Description of the drawings
The attached drawing for forming the part of the application is used for providing further understanding of the present application, the schematic reality of the application
Example and its explanation are applied for explaining the application, does not form the improper restriction to the application.In the accompanying drawings:
Fig. 1 is the flow chart according to database aggregation processing method provided by the embodiments of the present application;And
Fig. 2 is the schematic diagram according to database polymerization processing apparatus provided by the embodiments of the present application.
Specific embodiment
It should be noted that in the absence of conflict, the feature in embodiment and embodiment in the application can phase
Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
In order to which those skilled in the art is made to more fully understand application scheme, below in conjunction in the embodiment of the present application
The technical solution in the embodiment of the present application is clearly and completely described in attached drawing, it is clear that described embodiment is only
The embodiment of the application part, instead of all the embodiments.Based on the embodiment in the application, ordinary skill people
Member's all other embodiments obtained without making creative work should all belong to the model of the application protection
It encloses.
It should be noted that term " first " in the description and claims of this application and above-mentioned attached drawing, "
Two " etc. be the object for distinguishing similar, and specific sequence or precedence are described without being used for.It should be appreciated that it uses in this way
Data can be interchanged in the appropriate case, so as to embodiments herein described herein.In addition, term " comprising " and " tool
Have " and their any deformation, it is intended that cover it is non-exclusive include, for example, containing series of steps or unit
Process, method, system, product or equipment are not necessarily limited to those steps or unit clearly listed, but may include without clear
It is listing to Chu or for the intrinsic other steps of these processes, method, product or equipment or unit.
According to an embodiment of the present application, a kind of database aggregation processing method is provided.
Fig. 1 is the flow chart according to the database aggregation processing method of the embodiment of the present application.As shown in Figure 1, this method packet
Include following steps:
Step S101 obtains dimension and index in the querying condition for inquiring database, wherein, index is inquiry
Content, dimension are the restrictive condition of limitation inquiry content.
For example, it is order volume and access of the first quarter to product A for inquiring the querying condition of database to get
The restrictive condition of amount, the first quarter and product A as limitation inquiry content, the content of order volume and visit capacity as inquiry.
That is, dimension is the first quarter and product A, index is order volume and visit capacity, it should be noted that the index in querying condition is
Index in original tables of data.
Step S102 searches the corresponding equivalent index of each index in querying condition, wherein, equivalent index is in Aggregation Table
Index, Aggregation Table is the table being polymerize to original tables of data.
Each index is the index in original tables of data in querying condition, and equivalent index is the index in Aggregation Table.It looks into
The corresponding equivalent index of each index in querying condition is looked for, for example, the corresponding equivalence of order volume searched in querying condition refers to
Mark.
Optionally, in database aggregation processing method provided by the embodiments of the present application, the corresponding equivalent index of index is
Preconfigured, the corresponding index of equivalent index is equal.That is, by the index in querying condition in original tables of data
In carry out inquiry and inquired in Aggregation Table with using its corresponding equivalent index, return obtained after inquiring the result is that identical
's.By the method for the dynamic replacement of index of equal value, the corresponding equivalent index of each index in querying condition is searched.
It should be noted that Aggregation Table in this application is according to preset condition polymerize to original tables of data
The table arrived.For example, Aggregation Table is only arranged comprising limited dimension and index, so that the efficiency data query in Aggregation Table is more
Soon.
Optionally, it is each in querying condition is searched in database aggregation processing method provided by the embodiments of the present application
After the corresponding equivalent index of index, this method further includes:If not finding the index of equivalent index, using not finding equivalence
The index of index is inquired in original tables of data.
The corresponding equivalent index of index namely do not include in querying condition in Aggregation Table in querying condition is not found
During the corresponding equivalent index of index, in order to ensure the validity and accuracy of inquiry, the index for not finding equivalent index is used
It is inquired in original tables of data.
Step S103 for the equivalent index found, judges whether include dimension in the Aggregation Table where equivalent index.
For the equivalent index found, judge whether include the dimension in querying condition in the Aggregation Table where equivalent index
Degree for example, finding the corresponding equivalent index of order volume in querying condition, judges the corresponding equivalent index place of order volume
Aggregation Table in whether include querying condition in dimension (that is, the first quarter and product A).
It should be noted that dimension instruction mentioned in this application is all dimensions of the querying condition namely sentences
Whether all dimensions in querying condition are included in Aggregation Table where disconnected equivalence index.
Step S104 in the case where the judgment result is yes, is inquired using equivalent index and dimension in Aggregation Table,
And return to the result obtained after inquiry.
For example, the Aggregation Table where the corresponding equivalent index of order volume includes the first quarter in querying condition and product
A is inquired, and return to the result obtained after inquiry using the corresponding equivalent index of order volume and dimension in Aggregation Table.
Since Aggregation Table in this application is the table that is polymerize to original tables of data according to preset condition.It is poly-
Table is closed only comprising limited dimension row and index, therefore inquired in Aggregation Table using equivalent index and dimension, data are looked into
Ask efficiency faster.
Optionally, in database aggregation processing method provided by the embodiments of the present application, an index in querying condition
In the case of corresponding multiple equivalent indexs, inquiry is carried out in Aggregation Table using equivalent index and dimension and included:From multiple equivalences
The equivalent index of Aggregation Table data volume expense minimum in index where the equivalent index of selection;Using equivalent index and dimension in number
It is inquired in Aggregation Table according to amount expense minimum.
It should be noted that an index in querying condition in this application corresponds to multiple equivalent indexs, expression
It is the situation that some index in querying condition corresponds to multiple equivalent indexs.
For example, in the case of the corresponding multiple equivalent indexs of order volume (some index in querying condition), from order
It measures the equivalent index of the Aggregation Table data volume expense minimum in corresponding multiple equivalent indexs where the equivalent index of selection and makes
It is inquired in the Aggregation Table of data volume expense minimum with the corresponding equivalent index of order volume and dimension.
Specifically, in database aggregation processing method provided by the embodiments of the present application, an index in querying condition
In the case of corresponding multiple equivalent indexs, inquiry is carried out in Aggregation Table using equivalent index and dimension and included:It determines multiple etc.
The Aggregation Table data volume expense being worth where index;By the Aggregation Table where multiple equivalent indexs according to data volume expense from small to large
It is ranked up;Judge whether the dimension for including querying condition since the Aggregation Table of data volume expense minimum;It is in judging result
In the case of being, inquired in the Aggregation Table of data volume expense minimum;In the case where judging result is no, sentence again successively
Whether include dimension in disconnected next Aggregation Table.
For example, in the case of the corresponding multiple equivalent indexs of order volume, according to the Aggregation Table where multiple equivalent indexs
Data volume expense selects the Aggregation Table of data volume expense minimum, judges whether to wrap since the Aggregation Table of data volume expense minimum
The dimension (that is, the first quarter and product A) of querying condition is included, includes querying condition in the Aggregation Table of data volume expense minimum
In the case of the first quarter and product A, inquired in the Aggregation Table in data volume expense minimum.If data volume expense is most
Small Aggregation Table does not include the first quarter of querying condition and product A, judges whether include looking into next Aggregation Table again successively
The first quarter and product A in inquiry condition, until determining that some Aggregation Table includes the first quarter in querying condition and product A
In the case of, it is inquired in the Aggregation Table.
By carrying out data query from the prepolymerization table of expense minimum, ensure also to reach acceleration number while inquiry effect
It is investigated that the effect ask.
Optionally, in database aggregation processing method provided by the embodiments of the present application, this method is applied to enquiring component
In.
By enquiring component using database aggregation processing method provided by the embodiments of the present application, pass through the dynamic of index of equal value
The method that state is replaced selects the prepolymerization table of minimal-overhead for meeting querying condition to be inquired, and reaches and accelerates data query
Effect also improves the efficiency for carrying out data query in the database.
Database aggregation processing method provided by the embodiments of the present application, by obtaining the querying condition for inquiring database
In dimension and index, wherein, index be inquiry content, dimension be limitation inquire content restrictive condition;Search inquiry item
The corresponding equivalent index of each index in part, wherein, equivalent index is the index in Aggregation Table, and Aggregation Table is to original data
The table that table is polymerize;For the equivalent index found, judge whether include dimension in the Aggregation Table where equivalent index
Degree;And in the case where the judgment result is yes, it is inquired in Aggregation Table using equivalent index and dimension, and returns to inquiry
It is obtaining afterwards as a result, solving the problems, such as to carry out in the database in the relevant technologies less efficient during data query.And then reach
Promote the effect for the efficiency for carrying out data query in the database.
It should be noted that step shown in the flowchart of the accompanying drawings can be in such as a group of computer-executable instructions
It is performed in computer system, although also, show logical order in flow charts, it in some cases, can be with not
The sequence being same as herein performs shown or described step.
The embodiment of the present application additionally provides a kind of database polymerization processing apparatus, it should be noted that the embodiment of the present application
Database polymerization processing apparatus can be used for performing that the embodiment of the present application provided for database aggregation processing method.With
Under database polymerization processing apparatus provided by the embodiments of the present application is introduced.
Fig. 2 is the schematic diagram according to the database polymerization processing apparatus of the embodiment of the present application.As shown in Fig. 2, the device packet
It includes:Acquiring unit 10, searching unit 20,30 and first query unit 40 of judging unit.
Specifically, acquiring unit 10, for obtaining dimension and index in the querying condition for inquiring database,
In, index is the content of inquiry, and dimension is the restrictive condition of limitation inquiry content.
Searching unit 20, for searching the corresponding equivalent index of each index in querying condition, wherein, equivalent index is poly-
The index in table is closed, Aggregation Table is the table being polymerize to original tables of data.
Judging unit 30, for for the equivalent index found, judging whether wrapped in the Aggregation Table where equivalent index
Include dimension.
First query unit 40, in the case where the judgment result is yes, using equivalent index and dimension in Aggregation Table
In inquired, and return to obtained result after inquiry.
Database polymerization processing apparatus provided by the embodiments of the present application obtains to inquire database by acquiring unit 10
Querying condition in dimension and index, wherein, index be inquiry content, dimension be limitation inquire content restrictive condition;
Searching unit 20 searches the corresponding equivalent index of each index in querying condition, wherein, equivalent index is the index in Aggregation Table,
Aggregation Table is the table being polymerize to original tables of data;Judging unit 30 such as judges at the equivalent index that finds
Whether include dimension in Aggregation Table where value index;And first query unit 40 in the case where the judgment result is yes, make
Inquired in Aggregation Table with equivalent index and dimension, and return inquiry after obtain as a result, solve in the relevant technologies
The problem of less efficient during data query is carried out in database, and then has reached the effect for being promoted and carrying out data query in the database
The effect of rate.
Optionally, in database polymerization processing apparatus provided by the embodiments of the present application, an index in querying condition
In the case of corresponding multiple equivalent indexs, the first query unit 40 includes:Selecting module, for being selected from multiple equivalent indexs
The equivalent index of Aggregation Table data volume expense minimum where equivalent index;First enquiry module, for use equivalent index and
Dimension is inquired in the Aggregation Table of data volume expense minimum.
Optionally, in database polymerization processing apparatus provided by the embodiments of the present application, an index in querying condition
In the case of corresponding multiple equivalent indexs, the first query unit 40 includes:Determining module, for determining multiple equivalent indexs places
Aggregation Table data volume expense;Sorting module, for by the Aggregation Table where multiple equivalent indexs according to data volume expense from small
To being ranked up greatly;First judgment module, for judging whether to include since the Aggregation Table of data volume expense minimum to inquire item
The dimension of part;Second enquiry module, in the case where the judgment result is yes, in the Aggregation Table of data volume expense minimum into
Row inquiry;Second judgment module in the case of being no in judging result, judges whether wrapped in next Aggregation Table successively again
Include dimension.
Optionally, in database polymerization processing apparatus provided by the embodiments of the present application, which further includes:Second inquiry
Unit, after the corresponding equivalent index of index each in querying condition is searched, if not finding the index of equivalent index,
It is inquired in original tables of data using the index for not finding equivalent index.
The database polymerization processing apparatus includes processor and memory, and above-mentioned acquiring unit 10, is sentenced searching unit 20
30 and first query unit of disconnected unit, 40 grade in memory, storage is stored in by processor execution as program unit storage
Above procedure unit in device realizes corresponding function.
Comprising kernel in processor, gone in memory to transfer corresponding program unit by kernel.Kernel can set one
Or more, it is inquired in the database by adjusting kernel parameter.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/
Or the forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM), memory includes at least one deposit
Store up chip.
Present invention also provides a kind of embodiment of computer program product, when being performed on data processing equipment, fitting
In the program code for performing initialization there are as below methods step:It obtains the dimension in the querying condition for inquiring database and refers to
Mark, wherein, index is the content of inquiry, and dimension is the restrictive condition of limitation inquiry content;Search each index in querying condition
Corresponding equivalence index, wherein, equivalent index is the index in Aggregation Table, and Aggregation Table is to original tables of data polymerize
The table arrived;For the equivalent index found, judge whether include dimension in the Aggregation Table where equivalent index;And judging
As a result in the case of being, to be inquired in Aggregation Table using equivalent index and dimension, and the result obtained after inquiry is returned.
It should be noted that for aforementioned each method embodiment, in order to be briefly described, therefore it is all expressed as a series of
Combination of actions, but those skilled in the art should know, the application is not limited by described sequence of movement because
According to the application, certain steps may be used other sequences or be carried out at the same time.Secondly, those skilled in the art should also know
It knows, embodiment described in this description belongs to preferred embodiment, involved action and module not necessarily the application
It is necessary.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, there is no the portion being described in detail in some embodiment
Point, it may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed device, it can be by another way
It realizes.For example, the apparatus embodiments described above are merely exemplary, such as the division of the unit, it is only a kind of
Division of logic function, can there is an other dividing mode in actual implementation, such as multiple units or component can combine or can
To be integrated into another system or some features can be ignored or does not perform.
The unit illustrated as separating component may or may not be physically separate, be shown as unit
The component shown may or may not be physical unit, you can be located at a place or can also be distributed to multiple
In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme
's.
In addition, each functional unit in each embodiment of the application can be integrated in a processing unit, it can also
That each unit is individually physically present, can also two or more units integrate in a unit.Above-mentioned integrated list
The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
Obviously, those skilled in the art should be understood that each module of above-mentioned the application or each step can be with general
Computing device realize that they can concentrate on single computing device or be distributed in multiple computing devices and be formed
Network on, optionally, they can be realized with the program code that computing device can perform, it is thus possible to which they are stored
In the storage device by computing device come perform either they are fabricated to respectively each integrated circuit modules or by they
In multiple modules or step be fabricated to single integrated circuit module to realize.In this way, the application be not limited to it is any specific
Hardware and software combines.
The foregoing is merely the preferred embodiments of the application, are not limited to the application, for those skilled in the art
For member, the application can have various modifications and variations.All any modifications within spirit herein and principle, made,
Equivalent replacement, improvement etc., should be included within the protection domain of the application.
Claims (10)
1. a kind of database aggregation processing method, which is characterized in that including:
The dimension and index in the querying condition for inquiring database are obtained, wherein, the index is the content of inquiry, described
Dimension is the restrictive condition of limitation inquiry content;
The corresponding equivalent index of each index in the querying condition is searched, wherein, the equivalence index is the finger in Aggregation Table
Mark, the Aggregation Table is the table being polymerize to original tables of data;
For the equivalent index found, judge whether include the dimension in the Aggregation Table where the equivalent index;And
In the case where the judgment result is yes, it is inquired in Aggregation Table, and return using the equivalent index and the dimension
Return the result obtained after inquiry.
2. according to the method described in claim 1, it is characterized in that, an index corresponds to multiple equivalences in the querying condition
In the case of index, inquiry is carried out in Aggregation Table using the equivalent index and the dimension and is included:
The equivalent index of Aggregation Table data volume expense minimum from the multiple equivalent index where the equivalent index of selection;
It is inquired in the Aggregation Table of the data volume expense minimum using the equivalent index and the dimension.
3. according to the method described in claim 1, it is characterized in that, an index corresponds to multiple equivalences in the querying condition
In the case of index, inquiry is carried out in Aggregation Table using the equivalent index and the dimension and is included:
Determine the Aggregation Table data volume expense where the multiple equivalent index;
Aggregation Table where the multiple equivalent index is ranked up from small to large according to data volume expense;
Judge whether the dimension for including the querying condition since the Aggregation Table of the data volume expense minimum;
In the case where the judgment result is yes, it is inquired in the Aggregation Table of the data volume expense minimum;
In the case where judging result is no, judge whether include the dimension in next Aggregation Table again successively.
4. according to the method described in claim 1, it is characterized in that, each index is corresponding etc. in the querying condition is searched
It is worth after index, the method further includes:
If not finding the index of equivalent index, using the index for not finding equivalent index in the original tables of data
In inquired.
5. according to the method in any one of claims 1 to 3, which is characterized in that the corresponding equivalent index of the index is
Preconfigured, the corresponding index of the equivalence index is equal.
6. method according to any one of claim 1 to 4, which is characterized in that the method is applied in enquiring component.
7. a kind of database polymerization processing apparatus, which is characterized in that including:
Acquiring unit, for obtaining dimension and index in the querying condition for inquiring database, wherein, the index is looks into
The content of inquiry, the dimension are the restrictive condition of limitation inquiry content;
Searching unit, for searching the corresponding equivalent index of each index in the querying condition, wherein, the equivalence index is
Index in Aggregation Table, the Aggregation Table are the table being polymerize to original tables of data;
Judging unit, for for the equivalent index found, judging whether include in the Aggregation Table where the equivalent index
The dimension;And
First query unit, in the case where the judgment result is yes, being polymerize using the equivalent index and the dimension
It is inquired in table, and returns to the result obtained after inquiry.
8. device according to claim 7 a, which is characterized in that index corresponds to multiple equivalences in the querying condition
In the case of index, first query unit includes:
Selecting module, minimum for the Aggregation Table data volume expense where selecting equivalent index from the multiple equivalent index
Equivalent index;
First enquiry module, for using the equivalent index and the dimension in the Aggregation Table of the data volume expense minimum
It is inquired.
9. device according to claim 7 a, which is characterized in that index corresponds to multiple equivalences in the querying condition
In the case of index, first query unit includes:
Determining module, for determining the Aggregation Table data volume expense where the multiple equivalent index;
Sorting module, for the Aggregation Table where the multiple equivalent index to be arranged from small to large according to data volume expense
Sequence;
First judgment module, for judging whether to include the querying condition since the Aggregation Table of the data volume expense minimum
Dimension;
Second enquiry module, in the case where the judgment result is yes, in the Aggregation Table of the data volume expense minimum into
Row inquiry;
Second judgment module in the case of being no in judging result, judges whether include in next Aggregation Table successively again
The dimension.
10. device according to claim 7, which is characterized in that described device further includes:
Second query unit, after the corresponding equivalent index of index each in the querying condition is searched, if not searching
To the index of equivalent index, inquired in the original tables of data using the index for not finding equivalent index.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611265836.XA CN108268538A (en) | 2016-12-30 | 2016-12-30 | Database aggregation processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611265836.XA CN108268538A (en) | 2016-12-30 | 2016-12-30 | Database aggregation processing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108268538A true CN108268538A (en) | 2018-07-10 |
Family
ID=62770132
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611265836.XA Pending CN108268538A (en) | 2016-12-30 | 2016-12-30 | Database aggregation processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108268538A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080147596A1 (en) * | 2006-12-18 | 2008-06-19 | Mckenna William | Method and system for improving sql database query performance |
CN101639839A (en) * | 2008-07-30 | 2010-02-03 | 中兴通讯股份有限公司 | Method for searching multi-archive file based on temporary table |
CN102682118A (en) * | 2012-05-15 | 2012-09-19 | 北京久其软件股份有限公司 | Multidimensional data model access method and device |
CN104486116A (en) * | 2014-12-12 | 2015-04-01 | 北京百度网讯科技有限公司 | Multidimensional query method and multidimensional query system of flow data |
-
2016
- 2016-12-30 CN CN201611265836.XA patent/CN108268538A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20080147596A1 (en) * | 2006-12-18 | 2008-06-19 | Mckenna William | Method and system for improving sql database query performance |
CN101639839A (en) * | 2008-07-30 | 2010-02-03 | 中兴通讯股份有限公司 | Method for searching multi-archive file based on temporary table |
CN102682118A (en) * | 2012-05-15 | 2012-09-19 | 北京久其软件股份有限公司 | Multidimensional data model access method and device |
CN104486116A (en) * | 2014-12-12 | 2015-04-01 | 北京百度网讯科技有限公司 | Multidimensional query method and multidimensional query system of flow data |
Non-Patent Citations (1)
Title |
---|
胡雅颖等: "基于物化视图的查询系统研究与实现", 《计算机科学与工程》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108268524A (en) | Database aggregation processing method and device | |
CN104580027B (en) | A kind of OpenFlow message forwarding methods and equipment | |
JP5575902B2 (en) | Information retrieval based on query semantic patterns | |
CN105528407B (en) | Method and device for acquiring L users with optimal propagation influence | |
CN109885546A (en) | User behaviors log storage method, device and electronic equipment | |
CN105335402B (en) | Searching method, index data generation method and device based on static Cache | |
US20220253491A1 (en) | Information Recommendation Method and Apparatus, and Electronic Device | |
CN108536739B (en) | Metadata sensitive information field identification method, device, equipment and storage medium | |
CN102298650B (en) | Distributed recommendation method of massive digital information | |
EP3217296A1 (en) | Data query method and apparatus | |
CN107967279A (en) | The data-updating method and device of distributed data base | |
CN110276060A (en) | The method and device of data processing | |
CN107832444A (en) | Event based on search daily record finds method and device | |
CN110532273A (en) | The processing method and processing device of tables of data, storage medium, electronic device | |
CN109885651A (en) | A kind of question pushing method and device | |
CN108268523A (en) | Database aggregation processing method and device | |
CN109753504A (en) | Data query method and device | |
CN106649385B (en) | Data reordering method and device based on HBase database | |
CN110555034B (en) | Data query paging method, device, server and medium | |
CN109783678B (en) | Image searching method and device | |
CN108268536A (en) | Database aggregation processing method and device | |
CN104408036B (en) | It is associated with recognition methods and the device of topic | |
CN104463460B (en) | Processing method and processing device for the waiting information that network data is launched | |
CN105589873B (en) | Data searching method, terminal and server | |
CN109241103A (en) | Data expansion querying method, electronic device and computer readable storage medium |
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 | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 100083 No. 401, 4th Floor, Haitai Building, 229 North Fourth Ring Road, Haidian District, Beijing Applicant after: Beijing Guoshuang Technology Co.,Ltd. Address before: 100086 Cuigong Hotel, 76 Zhichun Road, Shuangyushu District, Haidian District, Beijing Applicant before: Beijing Guoshuang Technology Co.,Ltd. |
|
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180710 |