CN110019238B - Method, device and storage medium for partition clipping in multi-dimensional range - Google Patents

Method, device and storage medium for partition clipping in multi-dimensional range Download PDF

Info

Publication number
CN110019238B
CN110019238B CN201711478050.0A CN201711478050A CN110019238B CN 110019238 B CN110019238 B CN 110019238B CN 201711478050 A CN201711478050 A CN 201711478050A CN 110019238 B CN110019238 B CN 110019238B
Authority
CN
China
Prior art keywords
sub
range
expression
partition
ranges
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
CN201711478050.0A
Other languages
Chinese (zh)
Other versions
CN110019238A (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.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201711478050.0A priority Critical patent/CN110019238B/en
Publication of CN110019238A publication Critical patent/CN110019238A/en
Application granted granted Critical
Publication of CN110019238B publication Critical patent/CN110019238B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2264Multidimensional index structures
    • 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/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof

Abstract

The invention discloses a method and a device for partition clipping of a multi-dimensional range and a storage medium. The method comprises the following steps: decomposing an expression for clipping the data table into a plurality of sub-expressions based on fields of a plurality of dimension ranges of the data table to be clipped; acquiring a sub-range of the sub-expression in the data table; expanding the sub-ranges to generate a plurality of expanded ranges; based on each extension range, cutting the data table to obtain each subarea; and merging the subareas to obtain a merged area. Therefore, the embodiment of the invention can support the partition cutting of a multi-dimensional range, and the application range of the partition cutting is enlarged; more arrangement and combination conditions can be processed, and partition cutting can be thorough and accurate; the subsequent scanning range can be further narrowed, the time consumption of scanning is shortened, and support can be provided for obtaining accurate target data.

Description

Method, device and storage medium for partition clipping of multi-dimensional range
Technical Field
The present invention relates to the field of database query optimization technologies, and in particular, to a method, an apparatus, and a storage medium for Partition Pruning (Partition Pruning) in a multidimensional range.
Background
With the rapid development of network technology, the data volume in the database is rapidly increased, and a big data era has come. Data is typically stored in a database by region. In a logic layer, data can be divided into a plurality of partitions and stored in different partition tables; at the physical layer, data can be divided into a plurality of partitions and stored in different data files or distributed database nodes. In a database comprising mass data, a user can acquire a target partition by a partition clipping method.
And the partition cutting is to cut the partitions according to the predicate expressions so as to cut out the partitions which do not belong to the predicate expressions and the residual target partitions. A predicate expression is a computational expression that is represented in a database. For example, for propositions: the royal light is a football player or a volleyball player. If, the Wangliang is counted as: and a, the Wangliang is counted by football players: f (a), the Wangliang is counted by the volleyball player: g (a), then the predicate expression for the proposition may be: f (a) V.g (a).
Specifically, partition clipping is an optimization method for scanning partition tables in a database. When scanning the partition table, the clipping component may first check the conditional expression of the predicate for the presence of a filter condition for the partition field. If the filter criteria exist, the partition meeting the filter criteria is accessed. For the partitions which do not meet the conditions, scanning is not needed, so that the aim of reducing the data scanning amount is fulfilled, and the data scanning time is further reduced.
The existing database products, such as Mysql and the like, only perform partition cutting on predicates related to one dimension range, and if the predicates related to a plurality of dimension ranges are related, the partition cutting cannot be performed. When partition clipping is not possible, all partitions need to be scanned. Resulting in a longer overall time-consuming scan of the partition table for multiple dimensional ranges.
How to solve the problem that the partition table scanning in a plurality of dimension ranges consumes long time is a technical problem to be solved urgently.
Disclosure of Invention
In order to solve the problem that scanning of partition tables in multiple dimensional ranges is long, embodiments of the present invention provide a method, an apparatus, and a storage medium for partition clipping in multiple dimensional ranges.
In a first aspect, a method for partition clipping of a multidimensional range is provided. The method comprises the following steps:
decomposing an expression for clipping the data table into a plurality of sub-expressions based on fields of a plurality of dimension ranges of the data table to be clipped;
acquiring a sub-range of the sub-expression in the data table;
expanding the sub-ranges to generate a plurality of expanded ranges;
based on each extension range, cutting the data table to obtain each subarea;
and merging the subareas to obtain a merged area.
In a second aspect, an apparatus for partition clipping of a multidimensional range is provided. The device comprises:
an expression decomposition component, a range acquisition component, a range expansion component, a partition clipping component and a partition merging component,
the expression decomposition component and the range expansion component are each coupled to the range acquisition component,
the range expansion component and the partition merging component are respectively coupled to the partition clipping component,
wherein:
the expression decomposition component decomposes the expression for cutting the data table into a plurality of sub-expressions based on fields of a plurality of dimensionality ranges of the data table to be cut;
the range acquisition component is used for acquiring the sub-range of the sub-expression in the data table;
the range expansion component is used for expanding the sub-ranges and generating a plurality of expansion ranges;
the partition cutting component is used for cutting the data table based on each extension range to obtain each partition area;
and the partition merging component is used for merging the partition areas to obtain a merged area.
In a third aspect, a device for partition clipping of a multi-dimensional range is provided. The device includes:
a memory for storing a program;
a processor for executing the program stored by the memory, the program causing the processor to perform the method of the aspects described above.
In a fourth aspect, a computer-readable storage medium is provided. The computer readable storage medium has stored therein instructions which, when executed on a computer, cause the computer to perform the method of the above aspects.
In a fifth aspect, a computer program product containing instructions is provided. The product, when run on a computer, causes the computer to perform the method of the aspects described above.
In a sixth aspect, a computer program is provided. The computer program, when run on a computer, causes the computer to perform the methods of the aspects described above.
On one hand, the embodiment of the invention can decompose the expression for cutting the data table into a plurality of sub-expressions based on the fields of all the dimension ranges of the data table, thereby supporting the partition cutting of the multi-dimension range and expanding the application range of the partition cutting.
On the other hand, the embodiment of the invention can expand the sub-range, generate a plurality of expansion ranges, and cut the data table based on each expansion range to obtain each subarea, thereby realizing the mode of decomposing a single subarea cutting mode into a plurality of subarea cutting modes, not only processing more arrangement and combination conditions, but also leading the subarea cutting to be thorough and accurate.
In another aspect, the embodiment of the present invention may obtain an accurate merged partition by merging the accurate clipping partitions, thereby not only reducing a subsequent scanning range and shortening a scanning time, but also providing support for obtaining accurate target data.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a block diagram of a system architecture for partition clipping of a multi-dimensional range according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating a method of multi-dimensional range partition clipping according to an embodiment of the present invention;
FIG. 3 is a flow chart illustrating a method of multi-dimension range partition clipping according to another embodiment of the present invention;
FIG. 4 is a schematic structural diagram of a device for partition clipping of a multi-dimensional range according to another embodiment of the present invention;
FIG. 5 is a block diagram of an apparatus for multi-dimension range partition clipping according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict. The present application will be described in detail below with reference to the embodiments with reference to the attached drawings.
Fig. 1 is a schematic diagram of a system architecture for partition clipping of a multidimensional range according to an embodiment of the present invention.
As shown in fig. 1, the architecture may include: server 10, client 20, and network 30. The server 10 may include a database 11, and the database 11 may store a data table 111 therein.
One application scenario of this embodiment may be: the user 40 (e.g. a week) accesses the server 10 by using the client 20, and acquires the target area by a partition clipping method in the data table 111 of the database 11. After obtaining the target area, the user 40 may also scan within the target area to obtain target data.
The server 10 may be installed with a database 11 and various communication client applications, such as an instant messaging tool, a mailbox client, social platform software, audio video software, and the like. In general, the server 10 has a high hardware configuration and a strong computing power. In the case where the calculation pressure is small, the server 10 may be replaced with a desktop, a workstation, a mobile device, the above-described electronic device, or the like.
The database 11 may be a SQL database, an Oracle database, or the like.
The data table 111 may be a user transaction data table of a certain website, or may be a student information table of a certain school, or the like. The data table 111 may be shown in the following table (1), for example:
watch (1)
Figure BDA0001533235240000041
Figure BDA0001533235240000051
Referring to table (1), the target area is obtained by partition cropping in the data table 111 of the database 11, and the following may be obtained: the university was Beijing university, the college was computer school, and the grade was 2017's target area. The target area may be as shown in table (2) below:
watch (2)
Serial number Name(s) Number learning University College of academic Grade of year
1 Li Xi 100010 Peking University Computer school 2017 nd
2 Zhou Yue 100011 Peking University Computer school 2017 nd
3 Zhang Guo 100100 Peking University Computer school 2017 nd
Then, the user can scan in the target area, and can obtain the data information of the 3 classmatic names of "lie", "zhou yue" and "zhangguo".
Clients 20 include, but are not limited to, personal computers, smart phones, tablets, personal digital assistants, servers, and the like.
The network 30 may be a medium used to provide communication links between various electronic devices. In particular, network 30 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
It should be understood that the number of devices in fig. 1 is merely illustrative. The system architecture may have any number of servers 10, databases 11, data tables 111, clients 20, and networks 30, as desired for implementation. The data table 111 may increment or decrement the number columns. The method can be flexibly set according to actual conditions.
The following embodiments can all apply the system architecture of the present embodiment to perform processing such as partition clipping and data scanning.
Fig. 2 is a flowchart illustrating a method for partition clipping of a multidimensional range according to an embodiment of the present invention.
In this embodiment, the execution subject of the method step may be a processing component. It is to be understood that other processors with processing capabilities may also perform the present operations, and this aspect is not limiting.
As shown in fig. 2, the method comprises the steps of: s210, decomposing an expression for cutting the data table into a plurality of sub-expressions by the processing component based on fields of a plurality of dimensional ranges of the data table to be cut; s220, the processing component acquires the sub-range of the sub-expression in the data table; s230, processing the component expansion sub-range to generate a plurality of expansion ranges; s240, the processing component cuts the data table based on each extension range to obtain each subarea; and S250, combining the partition areas by the processing component to obtain a combined area.
In step S210, the expression may include: operators and characters, for example, the expression may be a predicate expression. A predicate expression is a computational expression that is represented in a database. The predicate expression may include: operators and values. Wherein the operator may include: =, < >, > =, < >, |! =,! !! < and so on. The values may be characters, numbers, etc. Referring to table (1) above, the predicate expression may be, for example: university of scanning = beijing university and college = computer school, etc.
In this embodiment, the clipping may be to filter out an area that does not meet a conditional relationship according to the conditional relationship of the expression, so as to obtain a remaining target area.
The step of the processing component decomposing the expression for clipping the data table into a plurality of sub-expressions (i.e., S210) based on the fields of the respective dimensional ranges of the data table to be clipped may include the sub-steps of:
s211, the processing component acquires fields of all the dimension ranges of the data table.
For example, in table (1), name, school number, university, college, and grade may each represent a range of dimensions. Table (1) may be a 1-dimensional 5-dimensional range table. Name, school number, university, college, and grade may all represent fields of a dimensional range. The column corresponding to each field may be a partition column.
S212, the processing component obtains characters corresponding to the fields in the expression.
For example, for a predicate expression: university = beijing university and college = computer college, the characters obtained may be: university, beijing university, and, college, =, computer college.
S213, the processing component decomposes the expression into a plurality of sub-expressions based on the characters.
For example, the expression of predicate university = beijing university and college = computer college may be decomposed as: university = Beijing university and college =2 sub-predicates from the computer college.
One implementation of the step of obtaining the sub-range for which the sub-expression is in the data table (i.e., S220) may include the sub-steps of:
s221, acquiring the associated field and a sub-expression comprising characters corresponding to the field;
for example, because university and Beijing university both include a university field, only the sub-predicates of university = Beijing university are obtained.
S222, in the dimension range where the field associated with the sub-expression is located, acquiring the sub-range of the sub-expression.
For example, the field associated with the sub-expression may be a range of data columns where universities are located.
In some embodiments, expanding the sub-range, generating a plurality of expanded ranges in S230, may include: taking out a partial sub-range from the plurality of sub-ranges; and arranging and combining the extracted sub-ranges to generate a plurality of extended expressions.
Therefore, partial key sub predicates can be taken out from the sub predicates according to the actual demand condition, the partial key sub predicates are arranged and combined based on the logic relation, and a plurality of combined predicates are obtained, so that the calculation amount can be reduced, and the scanning time can be reduced.
The embodiment has obvious effect particularly in website data statistics of mass data. For the sake of simplicity and simplicity of description, this embodiment only schematically lists the case where the amount of data is small. It is understood that the present embodiment can be applied to a database of mass data.
In some embodiments, expanding the sub-range, generating a plurality of expanded ranges in S230, may include: taking out all sub-ranges from the plurality of sub-ranges; and arranging and combining the extracted sub-ranges to generate a plurality of extended expressions.
Therefore, all the sub predicates can be taken out from the plurality of sub predicates according to the actual demand condition, all the sub predicates are arranged and combined based on the logic relation, a plurality of combined predicates are obtained, and the cutting precision can be improved.
In step S230, in the partition table, the extended range may be a rectangular range. Such as the rectangular data range of table (2) above.
In step S240, the step of cutting the data table based on each extension range to obtain each sub-region includes the following sub-steps:
s241, acquiring a public partial area of each sub-area;
s242, obtaining characteristic partial areas of each subarea;
after cutting out the invalid area, the obtained common partial area may be a header area (including a serial number, a name, and a college field) as shown in the following table (3) and table (4).
Watch (3)
Serial number Name (I)
5 Zhao Xinyi
6 Li Jiatong
Watch (4)
Serial number College of academic
5 Medical college
6 Physical college
In step S250, the merged partition may be as shown in table (5) below:
watch (5)
Serial number Name(s) College of academic
5 Zhao Xinyi Medical college
6 Li Jiatong Physical college
Therefore, the embodiment of the invention can introduce the permutation and combination theory on the basis of the original partition cutting, and optimizes the existing partition cutting method. Specifically, the partition cutting problem can be split into different sub-partition cutting problems according to a permutation and combination theory, then each sub-partition cutting problem is cut according to the existing partition cutting method, and simultaneously, the cutting results of all sub-partitions are combined according to the permutation and combination theory, so that the cutting of a plurality of partitions in different ranges is realized.
FIG. 3 is a flowchart illustrating a method for partition clipping of a multi-dimensional range according to another embodiment of the present invention.
As shown in fig. 3, the method comprises the steps of:
s310, decomposing the predicates according to the partition fields (such as fields of a plurality of dimensional ranges), and associating different partition fields with different predicates related to the different partition fields.
Assume that all partition fields of a partition table (e.g., a data table) are (C1, C2, C3, \ 8230;, cn), while all predicates are P. Where C1 may be the "name" field in table (1), C2 may be the "school number" field, C3 may be the "university" field, C4 may be the "college" field, C5 may be the "grade" field, etc. P may be: name = li xi and school number =100010and university = beijing university and college = computer college and grade =2017, etc.
The predicate P is decomposed according to all partition fields, and P can be decomposed into (P1, P2, P3, \ 8230;, pn). For example, P1 is "name = lie", P2 is "school number =100010", P3 is "university = beijing university", P4 is "college = computer college", and the like.
Associating different partition fields with different predicates to which they relate, resulting in (Ci- > Pi), where i =1, 2. Namely, the predicate P1 is associated with the partition field C1, the predicate P2' \ 8230is associated with the partition field C2, and the predicate Pm is associated with the partition field Cm. For example, "name" is associated with "name = lie", and "school number" is associated with "school number = 100010". The specific association mode can be determined by searching, and the searching is stopped as long as one partition field has no predicate Pj which can be partitioned and cut. That is, if there is no predicate in the partition field in the middle, it indicates that there is a hole in the range corresponding to the predicate, so the predicate related to the subsequent partition field does not need to be searched.
And S320, converting predicates Pi associated with all the partition fields into ranges.
Where a range may be a sub-range for which a predicate sub-expression is in a data table. The range may be one or more, and may be represented by Ri [1], ri [2],. And Ri [ ni ]. That is, the range of the partition field derived from its associated predicate is (Ci- > Ri [1], ri [2],. And Ri [ ni ]), where i =1,2,. And.m. The number of ranges is (n 1.. Multidot.,. Nm), respectively.
For example, the predicate P1 "university = beijing university" may be transferred to the range R1[1] of the following data table:
serial number University
1 Peking University
2 Peking University
3 Peking University
4 Peking University
5 Peking University
6 Peking University
For example, the predicate P2 "college = computer school" may transfer to the range R1[2] of the following data table:
serial number College of academic
1 Computer school
2 Computer school
3 Computer school
For example, the predicate P3 "name = lie" may be transferred into the range R1[3] of the following data table:
serial number Name (I)
1 Li Xi
And S330, obtaining a plurality of sub multi-dimensional partition cutting ranges (such as partition areas obtained by cutting a data table) from the partition ranges in a permutation and combination mode.
The partition range is (Ci- > Ri 1, ri 2., ri ni ]).
Multi-dimensional partition clipping range:
Figure BDA0001533235240000101
wherein SubRi represents a sub-multi-dimensional partition clipping range and is represented by
Figure BDA0001533235240000102
And (3) combining the components. Ri ∈ Ri, ri denotes the range Ri for each dimension, which originates from the field Ci. The number of multi-dimensional partition ranges may be n1 × n2.
For example, R1 < 1 >, R1 < 2 >, R1 < 3 > can be arranged and combined to obtain: r1 < 1 >, R1 < 2 >, R1 < 3 >, R1 < 1 > + R1 < 2 >, R1 < 1 > + R1 < 3 >, R1 < 1 > + R1 < 2 > + R1 < 3 > and the like.
S340, performing partition cutting according to the sub-multi-dimensional partition cutting range to obtain a cutting partition (such as a partition area).
The number of multi-dimensional partition ranges may be n1 × n2.. × nm.
The number of clipping partitions may also be n1 × n2.. × nm.
Clipping partitions is the result of partitioning, and may be used
Figure BDA0001533235240000103
result (i).
And S350, merging the clipping partitions to obtain merged partitions.
Merging
Figure BDA0001533235240000104
result (i) partition result obtains final partition clipping result, that is: and merging the partitions.
In some embodiments, assuming that the partition fields are (c 1, c2, c 3), respectively, multi-dimensional range partition clipping can be implemented according to the following 4 cases of predicates. In case 1, the predicate c1=1 can be set as follows:
serial number c1 c2 c3
1 1
2
3
First, predicates corresponding to partition columns, namely c1- > (c 1= 1), are collected.
Then, the predicate correspondence range, i.e., c1- > ([ 1,1 ]) is calculated. I.e., 1 is row 1, column 1 in the above table.
Since the other partition columns (c 2and c 3) have no predicate, the predicate corresponding range is: [ (1,min,min), (1,max,max) ]. Namely: [ (c 1 min, c2 min, c3 min), (c 1 max, c2 max, c3 max) ]. Since this embodiment only assigns c1, and neither c2 nor c3, the interval between c 2and c3 can be from min to max. Therefore, the minimum values of c 2and c3 may each be min, and the maximum values thereof may each be max.
Then, partition clipping is performed according to the range.
In case 2, the predicate c1=1and c2=1 can be set as follows:
serial number c1 c2 c3
1 1 1
2
3
First, a partition column is associated with its corresponding predicate, i.e.: c1- > (c 1= 1), c2- > (c 2= 1).
Then, calculating the corresponding range of the predicate, namely c1- > [1,1], c2- > [1,1], and then the corresponding range of the predicate is [ (1, min), (1, max) ].
And then, carrying out partition clipping according to the partition range.
In case 3, the predicate (c 1=1or c1= 2) and c2=1 can be defined as follows:
first, partition columns are associated with their corresponding predicates, i.e., c1- > (c 1=1or c1= 2), c2- > (c 2= 1).
Due to the existence of the expression of or, permutation and combination are performed, which is equivalent to (c 1=1and c2= 1) or (c 1=1and c2= 1).
Then, the partition range is calculated with reference to case 2.
The results of the clipping partitions are then merged.
In case 4, the following cases (c 1=1or c1= 2) and (c 2=1or c2= 2) can be considered:
first, partition columns are associated with their corresponding predicates, i.e., c1- > (c 1=1or c1= 2), c2- > (c 2=1or c2= 2).
Due to the presence of the expression of or, permutation and combination are performed for splitting, which is equivalent to (c 1=1and c2= 1) or (c 1=1and c2= 2) or (c 1=2and c2= 1) or (c 1=1and c2= 2).
Then, the partition range is calculated with reference to case 2.
The results of the clipping partitions are then merged.
The embodiment of the invention can arrange, combine and split all expressions into smaller calculation units, then calculate to obtain sub-results, and combine to obtain the final result.
The order of the above-mentioned operation steps is flexibly adjusted, or the above-mentioned steps are flexibly combined. Various implementations are not described again for the sake of brevity. In addition, the contents of the various embodiments may be mutually referenced.
The main body of the method may be a processing module, a controller, a processor, or the like. In the case of no conflict, those skilled in the art can flexibly adjust the sequence of the above operation steps according to actual needs, or flexibly combine the above steps, etc. Various implementations are not described again for the sake of brevity. In addition, the contents of the various embodiments may be mutually incorporated by reference.
Fig. 4 is a schematic structural diagram of a device for partition clipping of a multi-dimensional range according to another embodiment of the present invention.
As shown in fig. 4, the apparatus 400 for multi-dimensional range partition clipping may include: an expression decomposition component 401, a range acquisition component 402, a range expansion component 403, a partition clipping component 404, and a partition merging component 405. The expression decomposition component 401 and the range expansion component 403 are coupled to the range acquisition component 402, respectively, and the range expansion component 403 and the partition merging component 405 are coupled to the partition clipping component 404, respectively.
Wherein: the expression decomposition component 401 may decompose an expression used to crop a data table into a plurality of sub-expressions based on fields of a plurality of dimensional ranges of the data table to be cropped; the range acquisition component 402 can be used to acquire a sub-range for which a sub-expression is in a data table; the range expansion component 403 may be used to expand the sub-ranges, generating a plurality of expanded ranges; the partition clipping component 404 may clip the data table based on each extension range to obtain each partition area; the partition consolidation component 405 may be configured to consolidate the respective partitions to obtain a consolidated area.
In some embodiments, expression decomposition component 401 may also be used to: acquiring fields of all dimension ranges of a data table; acquiring characters corresponding to the fields in the expression; the expression is decomposed into a plurality of sub-expressions based on the characters.
In some embodiments, range acquisition component 402 may also be operative to: associating the field and a sub-expression comprising characters corresponding to the field; and acquiring the sub-range of the sub-expression in the dimension range of the field associated with the sub-expression.
In some embodiments, the range expansion component 403 may also be used to: taking out a part of the sub-ranges or the whole sub-ranges from the plurality of sub-ranges; and arranging and combining the extracted sub-ranges to generate a plurality of extended expressions.
In some embodiments, partition merge component 405 may also be to: acquiring a public part area of each subarea; acquiring characteristic partial areas of each sub-area; the common partial region and the characteristic partial region are merged such that the merged region includes the common partial region and the respective characteristic partial regions.
In some embodiments, the expression may include: operators and characters.
In some embodiments, the expression is a predicate expression.
It should be noted that the apparatuses in the foregoing embodiments may serve as an execution main body in the methods in the foregoing embodiments, and corresponding processes in the methods may be implemented to achieve the same technical effects, and for brevity, details of this aspect are not described again.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. For example, 2 elements may be integrated into one device, or 1 device may be divided into two separate elements, or the like. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product comprises one or more computer instructions which, when run on a computer, cause the computer to perform the method described in the various embodiments above. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk (SSD)), among others.
FIG. 5 is a block diagram of multi-dimension range partition clipping according to an embodiment of the present invention.
As shown in fig. 5, the framework may include a Central Processing Unit (CPU) 501 that may perform various operations as done by the embodiments of fig. 2and 3 in accordance with a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the system architecture are also stored. The CPU501, ROM 502, and RAM503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, according to an embodiment of the present invention, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the invention include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment may be implemented by software plus a necessary general hardware platform, and may also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (14)

1. A method for partition clipping of a multidimensional range is characterized by comprising the following steps:
decomposing an expression for clipping the data table into a plurality of sub-expressions based on fields of a plurality of dimension ranges of the data table to be clipped;
acquiring a sub-range of the sub-expression in the data table;
expanding the sub-ranges to generate a plurality of expanded ranges;
cutting the data table based on each expansion range to obtain each subarea;
merging the subareas to obtain a merged area;
the expanding the sub-range to generate a plurality of expanded ranges, comprising:
taking out a part of or all of the sub-ranges from a plurality of said sub-ranges;
and carrying out permutation and combination on the extracted sub-ranges to generate a plurality of extension ranges.
2. The method of claim 1, wherein decomposing the expression for clipping the data table into a plurality of sub-expressions based on fields of respective dimension ranges of the data table to be clipped comprises:
acquiring fields of all dimension ranges of the data table;
acquiring characters corresponding to the fields in the expression;
decomposing the expression into a plurality of sub-expressions based on the characters.
3. The method of claim 1, wherein the obtaining the sub-range of the sub-expression in the data table comprises:
obtaining the sub-expressions which are related to the fields and comprise the characters corresponding to the fields;
and acquiring the sub-range of the sub-expression in the dimension range of the field associated with the sub-expression.
4. The method according to claim 1, wherein the merging each of the sub-regions to obtain a merged region comprises:
acquiring a public part area of each sub-area;
acquiring a characteristic partial area of each sub-area;
the common partial region and the characteristic partial regions are merged such that the merged region includes the common partial region and each of the characteristic partial regions.
5. The method of any of claims 1-4, wherein the expression comprises: operators and characters.
6. The method of claim 5, wherein the expression is a predicate expression.
7. An apparatus for partition clipping in a multidimensional range, comprising:
an expression decomposition component, a range acquisition component, a range expansion component, a partition clipping component and a partition merging component,
the expression decomposition component and the range expansion component are each coupled to the range acquisition component,
the range expansion component and the partition merging component are respectively coupled with the partition clipping component,
wherein:
the expression decomposition component decomposes the expression for cutting the data table into a plurality of sub-expressions based on fields of a plurality of dimension ranges of the data table to be cut;
the range acquisition component is used for acquiring the sub-range of the sub-expression in the data table;
the range expansion component is used for expanding the sub-ranges to generate a plurality of expansion ranges;
the partition cutting component cuts the data table based on each extension range to obtain each partition area;
the partition merging component is used for merging the partition areas to obtain a merged area;
the range expansion component is further to:
taking out a part of the sub-ranges or the whole sub-ranges from the plurality of sub-ranges;
and arranging and combining the extracted sub-ranges to generate a plurality of extension ranges.
8. The apparatus of claim 7, wherein the expression decomposition component is further configured to:
acquiring fields of all dimension ranges of a data table;
acquiring characters corresponding to the fields in the expression;
the expression is decomposed into a plurality of sub-expressions based on the characters.
9. The apparatus of claim 7, wherein the range acquisition component is further configured to:
acquiring an associated field and a sub-expression comprising characters corresponding to the field;
and acquiring the sub-range of the sub-expression in the dimension range of the field associated with the sub-expression.
10. The apparatus of claim 7, wherein the partition merge component is further configured to:
acquiring a public part area of each subarea;
acquiring characteristic partial areas of each subarea;
the common partial region and the characteristic partial region are merged such that the merged region includes the common partial region and the respective characteristic partial regions.
11. The apparatus of any of claims 7-10, wherein the expression comprises: operators and characters.
12. The apparatus of claim 11, wherein the expression is a predicate expression.
13. An apparatus for partition clipping in a multi-dimensional range, comprising:
a memory for storing a program;
a processor for executing a program stored by the memory, the program causing the processor to perform the method of any of claims 1-6.
14. A computer-readable storage medium, comprising: the instructions that, when executed, cause the computer to perform,
the instructions, when executed on a computer, cause the computer to perform the method of any of claims 1-6.
CN201711478050.0A 2017-12-29 2017-12-29 Method, device and storage medium for partition clipping in multi-dimensional range Active CN110019238B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711478050.0A CN110019238B (en) 2017-12-29 2017-12-29 Method, device and storage medium for partition clipping in multi-dimensional range

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711478050.0A CN110019238B (en) 2017-12-29 2017-12-29 Method, device and storage medium for partition clipping in multi-dimensional range

Publications (2)

Publication Number Publication Date
CN110019238A CN110019238A (en) 2019-07-16
CN110019238B true CN110019238B (en) 2023-01-06

Family

ID=67187199

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711478050.0A Active CN110019238B (en) 2017-12-29 2017-12-29 Method, device and storage medium for partition clipping in multi-dimensional range

Country Status (1)

Country Link
CN (1) CN110019238B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111695289B (en) * 2020-05-13 2023-04-28 中国东方电气集团有限公司 Fault diagnosis method and platform for full-power converter
CN116775698B (en) * 2023-08-23 2023-11-24 本原数据(北京)信息技术有限公司 Partition clipping method and device for database, computer equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103177061A (en) * 2011-12-23 2013-06-26 Sap股份公司 Unique value estimation in partitioned tables
CN104685496A (en) * 2012-09-28 2015-06-03 甲骨文国际公司 Pruning disk blocks of a clustered table in a relational database management system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6665684B2 (en) * 1999-09-27 2003-12-16 Oracle International Corporation Partition pruning with composite partitioning
US7814104B2 (en) * 2005-05-04 2010-10-12 Oracle International Corporation Techniques for partition pruning
US9514187B2 (en) * 2012-09-28 2016-12-06 Oracle International Corporation Techniques for using zone map information for post index access pruning

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103177061A (en) * 2011-12-23 2013-06-26 Sap股份公司 Unique value estimation in partitioned tables
CN104685496A (en) * 2012-09-28 2015-06-03 甲骨文国际公司 Pruning disk blocks of a clustered table in a relational database management system

Also Published As

Publication number Publication date
CN110019238A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
US11281793B2 (en) User permission data query method and apparatus, electronic device and medium
US9372913B2 (en) Apparatus and method for harmonizing data along inferred hierarchical dimensions
JP7166381B2 (en) INQUIRY METHOD, DEVICE, ELECTRONIC DEVICE AND STORAGE MEDIUM
US20190272478A1 (en) Generating feature vectors from rdf graphs
US11003649B2 (en) Index establishment method and device
US11074267B2 (en) Staged approach to automatic data discovery and performance
US20140201203A1 (en) System, method and device for providing an automated electronic researcher
US10268655B2 (en) Method, device, server and storage medium of searching a group based on social network
CN110019238B (en) Method, device and storage medium for partition clipping in multi-dimensional range
US20150286679A1 (en) Executing a query having multiple set operators
US20140289268A1 (en) Systems and methods of rationing data assembly resources
CN107315753B (en) Paging method and device across multiple databases
US20160248724A1 (en) Social Message Monitoring Method and Apparatus
AU2018282315A1 (en) Relation aware aggregation (RAA) on normalized datasets
US20190050672A1 (en) INCREMENTAL AUTOMATIC UPDATE OF RANKED NEIGHBOR LISTS BASED ON k-th NEAREST NEIGHBORS
Xu et al. Scalable continual top-k keyword search in relational databases
CN111259090A (en) Graph generation method and device of relational data, electronic equipment and storage medium
WO2022103777A1 (en) Columnar techniques for big metadata management
US20230153357A1 (en) Method of processing an observation information, electronic device and storage medium
US20150227629A1 (en) Financial reporting system with reduced data redundancy
WO2016010591A1 (en) Search engine using name clustering
Kwong et al. A Review of the Impacts of Agenda-setting
US20130232172A1 (en) Methods and systems for matching expressions
Ganguly et al. Deterministic k-set structure
US11093504B2 (en) Server-side cross-model measure-based filtering

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40010889

Country of ref document: HK

GR01 Patent grant
GR01 Patent grant