WO2015062035A1 - 一种列式数据库处理方法及装置 - Google Patents

一种列式数据库处理方法及装置 Download PDF

Info

Publication number
WO2015062035A1
WO2015062035A1 PCT/CN2013/086341 CN2013086341W WO2015062035A1 WO 2015062035 A1 WO2015062035 A1 WO 2015062035A1 CN 2013086341 W CN2013086341 W CN 2013086341W WO 2015062035 A1 WO2015062035 A1 WO 2015062035A1
Authority
WO
WIPO (PCT)
Prior art keywords
operator
group
information
grouping
operators
Prior art date
Application number
PCT/CN2013/086341
Other languages
English (en)
French (fr)
Inventor
李俊
施会华
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP13896495.2A priority Critical patent/EP3057001A4/en
Priority to PCT/CN2013/086341 priority patent/WO2015062035A1/zh
Priority to CN201380001389.5A priority patent/CN105264519B/zh
Publication of WO2015062035A1 publication Critical patent/WO2015062035A1/zh
Priority to US15/143,132 priority patent/US20160246825A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/221Column-oriented storage; Management thereof
    • 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/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • G06F16/285Clustering or classification

Definitions

  • the columnar database In the Online Analytical Processing (OLAP) scenario of data analysis, because the columnar database is more suitable for the OLAP scenario than the row database, the columnar database becomes the hottest database of OLAP scenarios in the field of data analysis. technology.
  • OLAP Online Analytical Processing
  • a columnar database When a columnar database performs data storage, it usually divides the user-defined data table into multiple columns, and each column forms a separate file. In this way, when performing a large amount of data analysis, the columnar database only needs to read the columns in the query statement, so when the amount of data is relatively large, the processing efficiency is relatively high.
  • the inventor has found that although the listed database has the above advantages, when the data of the database is processed, because the operator of the columnar database (the operator) processes the data of one column, the data needs to be changed multiple times in the Cache. In and out, the cache cache utilization is low. And when the size of a column of data exceeds the size of the Cache, the database of the column is written from the Cache to the memory and then reloaded into the Cache, which increases the processing time for the columnar database to process the data. Therefore, how to improve the utilization of Cache and how to reduce the processing time of column data processing data is the problem that the industry is looking forward to. Summary of the invention
  • An embodiment of the present invention provides a columnar database processing method and apparatus, which can provide a columnar database processing method, including:
  • the grouping the operators in the first execution graph to generate at least one group of group information includes:
  • the currently determined operator does not have a barrier feature, the currently determined operator is incorporated into the current packet
  • the barrier feature is a specific operation including a user preselection, and the specific operation is any one of the following operations: a selection operation, a multi-table input operation, and an output to a plurality of operator operations.
  • the performing, by the at least one group of group information, modifying an execution process of the first execution map, generating a The second execution diagram includes:
  • the group information includes an operator information list, where the operator information list is each operator in the group and each a relationship table of operator types corresponding to the operator, wherein the operator type is a sequence operator, a multi-tune operator or a general operator, and the general operator refers to a sequence operator and a multi- ⁇ operator. Other types of operators.
  • the packet information further includes a packet identifier, where, if the packet identifier is a sequence identifier, the packet information corresponding packet is indicated The operators in the group are all sequential operators.
  • the group identifier is a multi- ⁇ identifier, it indicates that the operator in the grouping information corresponding group includes a multi-tune operator, and if the group information does not include the group identifier, the The operators in the grouping information corresponding to the grouping are all general operators.
  • the modifying, according to each group information in the at least one group of group information, the group corresponding to each group information Implementation process including:
  • the group identifier in the first group information is a sequence identifier
  • segmentation processing is performed on each column of the column database, and each operator in the group corresponding to the first group information is segmented. Each piece of data is processed in sequence; or
  • the merging operator is invoked, and all operators of the group corresponding to the first group information are replaced by the merging operator;
  • the execution process of the packet corresponding to the first packet information is not modified
  • the first group information is one of the at least one group of group information.
  • the merge operator is invoked, and All the operators of the group corresponding to the first group information are replaced by the combining operator, including:
  • the merging operator is called from the information mapping table according to all multi-manipulators of the first group, and the merging operator is replaced by the merging operator All the operators in the first group; wherein the information mapping table is a mapping relationship table between the multi-tune operator and the merging operator.
  • the method further includes:
  • Each column of data of the columnar database is segmented, and processed by the merge operator in the order of each segment of data after segmentation.
  • the modifying, according to each group information in the at least one group of group information, the group corresponding to each group information Implementation process including:
  • the merging operator is invoked, and all operators of the group corresponding to the first group information are replaced by the merging operator ;
  • the operator in the operator information list in the first group information is a general operator, the execution process of the packet corresponding to the first group information is not modified;
  • the first group information is one of the at least one group of group information.
  • a columnar database processing apparatus including:
  • a generating module configured to acquire a database operation statement of the columnar database, and generate a first execution map according to the database operation statement
  • a grouping module configured to group the operators in the first execution map to generate at least one group of group information, where each group group information corresponds to one group;
  • a processing module configured to repair, according to the at least one group of group information generated by the grouping module Performing an execution process of the first execution map to generate a second execution map;
  • An execution module configured to process data in the columnar database according to the second execution map.
  • the grouping module is specifically configured to: traverse the first execution map, and sequentially determine whether each operator in the first execution map has a barrier feature; If the currently determined operator has a barrier feature, the current packet is ended, the group information of the current packet is generated, and a new packet is generated; if the currently determined operator does not have a barrier feature, the current judgment is calculated. Sub-incorporating into the current packet;
  • the barrier feature is a specific operation including a user preselection, and the specific operation is any one of the following operations: a selection operation, a multi-table input operation, and an output to a plurality of operator operations.
  • the processing module includes:
  • a processing unit configured to separately modify an execution process of the packet corresponding to each of the group information according to each group information in the at least one group of group information generated by the grouping module;
  • an integration unit configured to integrate the modified execution process of the group corresponding to each of the component group information to generate the second execution map.
  • the group information includes an operator information list, where the operator information list is each operator in the group and each a relationship table of operator types corresponding to the operator, wherein the operator type is a sequence operator, a multi-tune operator or a general operator, and the general operator refers to a sequence operator and a multi- ⁇ operator. Other types of operators.
  • the packet information further includes a packet identifier, where, if the packet identifier is a sequence identifier, the packet information corresponding packet is indicated
  • the operators in the group are all sequential operators. If the group identifier is a multi- ⁇ identifier, it indicates that the operator in the grouping information corresponding group includes a multi-tune operator, and if the group information does not include the group identifier, the Group information
  • the operators in the corresponding group are general operators.
  • the processing unit is specifically configured to:
  • the group identifier in the first group information is a sequence identifier
  • segmentation processing is performed on each column of the column database, and each operator in the group corresponding to the first group information is segmented. Each piece of data is processed in sequence; or
  • the merging operator is invoked, and all operators of the group corresponding to the first group information are replaced by the merging operator;
  • the execution process of the packet corresponding to the first packet information is not modified
  • the first group information is one of the at least one group of group information.
  • the merge operator is invoked, and All the operators of the group corresponding to the first group information are replaced by the combining operator, specifically for:
  • the group identifier in the first group information is a multi- ⁇ identifier or the operator in the operator information list in the first group information includes a multi-tune operator, according to all multi-turn operators of the first group Recalling the merging operator from the information mapping table, and replacing all the operators in the first group by using the merging operator; wherein the information mapping table is a mapping relationship between a multi-tune operator and a merging operator table.
  • the combining operator is a sequence operator
  • the processing unit is further configured to: after calling the merge operator, and replacing all operators of the group corresponding to the first group information with the merge operator,
  • the segmentation process is performed according to each column of data of the library, and is processed sequentially by the combination operator according to the order of each piece of data after segmentation.
  • the processing unit is specifically configured to:
  • the merging operator is invoked, and all operators of the group corresponding to the first group information are replaced by the merging operator ;
  • the operator in the operator information list in the first group information is a general operator, the execution process of the packet corresponding to the first group information is not modified;
  • the first group information is one of the at least one group of group information.
  • a columnar database processing apparatus including a processor and a memory, the memory storing execution instructions, when the apparatus is in operation, the processor is in communication with the memory, and the processor executes The executing the instructions causes the apparatus to perform a method of:
  • the grouping the operators in the first execution map to generate at least one group of group information includes: traversing the first execution map, and sequentially determining each operator in the first execution map Whether the barrier feature is provided; if the currently determined operator has a barrier feature, ending the current packet, generating packet information of the current packet, storing the packet information in the memory, and generating a new packet; If the determined operator does not have a barrier feature, the currently determined operator is incorporated into the current packet;
  • the barrier feature is a specific operation including a user preselection, and the specific operation is any one of the following operations: a selection operation, a multi-table input operation, and an output to a plurality of operator operations.
  • the modifying the information according to the at least one group of group information For the execution process of the first execution map, generating the second execution map includes: modifying, according to each group information in the at least one group of group information, an execution process of the packet corresponding to each of the group information; The execution process of the packet corresponding to each grouping information is integrated to generate the second execution map.
  • the group information includes an operator information list, where the operator information list is each operator in the group and each a relationship table of operator types corresponding to the operator, wherein the operator type is a sequence operator, a multi-tune operator or a general operator, and the general operator refers to a sequence operator and a multi- ⁇ operator. Other types of operators.
  • the packet information further includes a packet identifier, where, if the packet identifier is a sequence identifier, the packet information corresponding packet is indicated
  • the operators in the group are all sequential operators. If the group identifier is a multi- ⁇ identifier, it indicates that the operator in the grouping information corresponding group includes a multi-tune operator, and if the group information does not include the group identifier, the The operators in the grouping information corresponding to the grouping are all general operators.
  • the packet information according to the at least one group of group information is respectively Modifying the execution of the group corresponding to each of the group information
  • the process including:
  • the group identifier in the first group information is a sequence identifier
  • segmentation processing is performed on each column of the column database, and each operator in the group corresponding to the first group information is segmented. Each piece of data is processed in sequence; or
  • the merging operator is invoked, and all operators of the group corresponding to the first group information are replaced by the merging operator;
  • the execution process of the packet corresponding to the first packet information is not modified
  • the first group information is one of the at least one group of group information.
  • the method includes: if the group identifier in the first group information is a multi-digit identifier, Calling the merge operator from the information mapping table according to all the multi-manipulators of the first group, and replacing all operators in the first group with the merge operator; wherein the information map A mapping table for the multi- ⁇ operator and the merge operator.
  • the combining operator is a sequence operator
  • the method further includes: Each column of data of the database is segmented, and processed by the merge operator in the order of each segment of data after segmentation.
  • the performing by the processor, the performing, by the each of the at least one group of the group information, the process of performing the packet corresponding to each of the group information, including:
  • the merging operator is invoked, and all operators of the group corresponding to the first group information are replaced by the merging operator ;
  • the operator in the operator information list in the first group information is a general operator, the execution process of the packet corresponding to the first group information is not modified;
  • the first group information is one of the at least one group of group information. All the operators in the row graph are grouped, at least one group of group information is generated, and the execution process of the execution map is modified according to the at least one group of group information, thereby optimizing the execution process of the entire execution map, and finally, according to the optimized new execution map.
  • the data in the columnar database is processed, thereby reducing the number of data exchanges and swaps in the Cache, improving the utilization of the Cache, and reducing the processing time of the column database processing data.
  • FIG. 1 is a schematic flowchart diagram of a column database processing method according to an embodiment of the present invention
  • FIG. 2 is a schematic flowchart of another column database processing method according to an embodiment of the present invention.
  • FIG. 3 is a schematic diagram of column data after an operator processes a group according to an embodiment of the present invention
  • FIG. 4 is a schematic diagram of an operator in a merged packet according to an embodiment of the present invention
  • FIG. 5 is a schematic structural diagram of a columnar database processing apparatus according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of another column database processing apparatus according to an embodiment of the present invention.
  • FIG. 7 is a schematic structural diagram of a columnar database processing apparatus according to another embodiment of the present invention. detailed description
  • the columnar database is one of the most popular database technologies in the field of data analysis, and the column database is usually run on a database management system on a common server when the data is processed.
  • the database management system first submits the user.
  • the SQL Structured Query Language
  • the SQL is converted into an execution 4 pairs, and then the execution tree is further translated into an execution graph. Each node in the execution graph is called an operator, and each calculation is performed.
  • the child will process one or more complete columns.
  • the columnar database processes only one column at a time, the data needs to be swapped in and out multiple times in the Cache, so that the utilization of the Cache cache is not high, and based on the above application scenario, the present invention provides a New columnar database processing method.
  • a column database processing method provided by an embodiment of the present invention specifically includes the following steps:
  • the columnar database processing apparatus acquires a database operation statement of the columnar database, and generates a first execution map according to the database operation statement.
  • the column database processing device parses the SQL statement into a corresponding execution tree according to a grammar.
  • the execution tree is optimized according to the existing rules after generating the execution tree, such as performing a select pushdown and repeating the calculation. Sub-merging and other functions, which reduces the computational strength of the entire execution tree.
  • the execution tree is translated into an execution graph, each node of the execution graph corresponds to an operator, and each operator corresponds to an executable function, so that The columnar database processing device performs a function call in accordance with the execution map, thereby completing the result output.
  • the columnar database processing device groups the operators in the first execution map to generate at least one group of group information.
  • the component group information in the at least one group of grouping information respectively corresponds to one group.
  • the grouping information includes at least an operator information list, where the operator information list is a relationship table of each operator in the group and an operator type corresponding to each operator, and may be a linear table structure.
  • the The operator information list may be a mapping relationship table between an operator and an operator type, and each table node stores operator information of an operator, and the operator information includes an operator type of the operator;
  • the above operator Types include three types: sequential operators, multi-turn operators, and general operators.
  • sequence operator refers to segmentation processing on each column of data (here, segmentation processing refers to dividing one column of data into multiple segments, and the operator sequentially processes each segment of data), and then simply merges The operator that can get the result;
  • the multi-tune operator refers to the operator that can not get the result after the segmentation process, such as group by , order , j oin , etc.;
  • the general operator means Sequence operators, other types of operators other than multi-turn operators.
  • the foregoing grouping information may further include a group identifier.
  • the group identifier in the group information is a sequence identifier, it indicates that the group information corresponding grouping
  • the operators in the group are all sequential operators; when the group identifier in the group information is a multi-digit identifier, it indicates that the operator in the grouping information corresponding group includes a multi-tune operator; when the group information does not include the group identifier , indicating that the operators in the corresponding grouping of the group information are general operators.
  • the columnar database processing device modifies the execution process of the first execution map according to the at least one group of group information to generate a second execution map.
  • the execution process of each group is modified differently, for example, segmenting each column of data in the column database, or all the groups in the group The operators are merged.
  • the columnar database processing device processes the data in the columnar database according to the second execution map. All the operators are grouped to generate at least one group of group information, and correspondingly modify the execution process of the grouping information corresponding group according to each group group information in the at least one group of group information, thereby optimizing the execution process of the entire execution map, and finally After optimization, the new execution map processes the data in the column database, thereby reducing the number of data exchanges and swaps in the Cache, improving the utilization of the Cache, and reducing the processing time of the column database processing data.
  • An embodiment of the present invention provides a columnar database processing method. As shown in FIG. 2, the method specifically includes the following steps:
  • the columnar database processing apparatus acquires a database operation statement of the columnar database, and generates a first execution map according to the database operation statement.
  • the column database processing device parses the SQL statement into a corresponding execution tree according to a grammar.
  • the execution tree is optimized according to the existing rules after generating the execution tree, such as performing a select pushdown and a double calculation. Sub-merging and other functions, which reduces the computational strength of the entire execution tree.
  • the execution tree is translated into an execution map, and each node of the execution map corresponds to an operator operator. Each operator corresponds to an executable function, so that the column database processing device performs a function call according to the execution map, thereby completing the result output.
  • the columnar database processing device groups all the operators in the first execution map to generate at least one group of group information.
  • step 202 specifically includes the following steps:
  • the columnar database processing device traverses the first execution map, and sequentially determines whether each operator in the first execution map has a barrier feature.
  • the barrier feature is an operator feature of a special operator.
  • the special operator is an operator having a specific operation pre-selected according to the actual application scenario or the user according to the actual input query statement, that is, the barrier feature is a specific operation including the user preselection.
  • the above specific operation is any one of the following operations: a selection operation, such as a select operator, a multi-table input operation, such as a j oin operator, and output to a plurality of operator operations. It should be noted that the above three specific operations are only an example here, and the actual application is not limited thereto.
  • step 202b If the currently determined operator has the barrier feature, then go to step 202b. If the currently determined operator does not have the barrier feature, then go to step 202c.
  • the column database processing device ends the current packet, generates group information of the current packet, and generates a new packet.
  • the column database processing device merges the currently determined operator into the current packet.
  • whether the operator in the execution map has a barrier feature is sequentially determined according to the order of the operators in the first execution map.
  • the column database processing device groups all the operators in the first execution map, first, first initializes a first group, and then sequentially determines whether each operator in the first execution map has a barrier.
  • a feature when determining a second operator having a barrier feature, ending the first group, generating group information corresponding to the first group, and generating a second group, and the second operator having the barrier feature The second group is stored, and then the remaining operators are sequentially determined, and the remaining operators are grouped.
  • each of the group information in the at least one group of grouping information corresponds to one group.
  • the grouping information includes at least an operator information list, where the operator information list is a relationship table of each operator in the group and an operator type corresponding to each operator, and may be a linear table structure.
  • the The operator information list may be a mapping relationship table between an operator and an operator type, and each table node stores operator information of an operator, and the operator information includes an operator type of the operator;
  • the above operator Types include three types: sequential operators, multi-turn operators, and general operators.
  • sequence operator refers to segmentation processing on each column of data (here, segmentation processing refers to dividing one column of data into multiple segments, and the operator sequentially processes each segment of data), and then simply merges The operator that can get the result;
  • the multi-tune operator refers to the operator that can not get the result after the segmentation process, such as group by , order , j oin , etc.;
  • the general operator means Sequence operators, other types of operators other than multi-turn operators.
  • the foregoing grouping information may further include a group identifier.
  • the group identifier in the group information is a sequence identifier, it indicates that the operators in the group information corresponding to the group information are sequential operators; when the group identifier in the group information is a multiple identifier, the group is indicated
  • the operator in the information corresponding grouping includes a multi-tune operator; when the group information does not include the group identifier, it indicates that the operators in the grouping information corresponding to the grouping information are general operators.
  • the columnar database processing apparatus modifies the execution process of the first execution map according to the at least one group of group information, and generates a second execution map.
  • the execution process of each group is modified in turn, for example, segmenting each column of data in the column database, or all the groups in the group The operators are merged.
  • step 203 specifically includes the following steps:
  • the columnar database processing device modifies the execution process of the packet corresponding to each group information according to each of the group information of the at least one group of group information.
  • the columnar database processing device integrates the executed execution process of the group corresponding to each of the modified component group information to generate a second execution map.
  • step 203 a specifically includes the following steps: 203 al. If the group identifier in the first group information is a sequence identifier or all operators in the operator information list in the first group information are sequential operators, the column database processing device uses data for each column of the column database. The segmentation process is performed, and each operator in the packet corresponding to the first group information is sequentially processed in the order of each segment of the segmented data.
  • the operators in the first group are sequential operators, it indicates that the first group can be segmented after the column data is processed, and the execution result can be obtained by simple merging. Therefore, when the operators in the first packet satisfy the condition of the sequence operator, the execution process of the first packet is changed. Specifically, the operator shown in FIG.
  • segmentation of the column data of the columnar database reduces the number of data exchanges and swaps in the Cache, and significantly improves the Cache. Utilization, and reduce the time to process columnar database data.
  • the column database processing device invokes the merge operator, and All operators of a packet corresponding to a group information are replaced with a merging operator.
  • the modification process of the execution process of the first group is: calling the merging operator corresponding to the multi-tune operator in the first group from the memory, and All operators in a group are replaced with merge operators.
  • the combined operator is doing multiple operations at the same time, which improves the speed and time of processing data.
  • the original operator processes the data independently, and the processing time is the sum of the two operator values.
  • the processing time of the two combined operators is directly added to the processing time of the original two operators.
  • the partially replaced merge operator supports segmentation operations, which improves the utilization of the cache and reduces the processing time for processing data.
  • the column database processing device does not modify the execution process of the packet corresponding to the first group information.
  • the foregoing first group information is one of the at least one group of group information, that is, the foregoing steps 203 al, 203 a2, and 203 a3 specifically describe any one of the at least one group.
  • the corresponding modification process of the execution process is one of the at least one group of group information, that is, the foregoing steps 203 al, 203 a2, and 203 a3 specifically describe any one of the at least one group.
  • step 203 a2 specifically includes the following process:
  • the column database processing device is based on all multi-manipulators of the first group
  • the merge operator is called in the information map, and all operators in the first group are replaced by the merge operator.
  • a table lookup operation is required, specifically, according to the multi-frame operator in the first group, from the pre-configured information mapping table.
  • the lookup table obtains the merge operator corresponding to the multi-tune operator, thereby replacing all the operators in the first group with the merge operator.
  • the above information mapping table is a mapping relationship table between a multi-turn operator and a merge operator.
  • judge this Whether the first group has a group by operator if yes, calling a merge operator including the group by operator; determining whether the first group has a j oin operator, and if so, calling the j oin operator Combining the operator; determining whether the first group has an order operator, and if so, calling the combining operator including the order operator.
  • the step 203b2 further includes: the column database processing device performs segmentation processing on each column of the column database, and performs the segmentation process by using the merging operator. The order of each piece of data is processed in turn.
  • the multi-turn operator in the execution graph is replaced by the merge operator, so when the merge operator is a sequence operator, the column database processing
  • the device may further segment each column of data of the columnar database, and then sequentially process the data according to the sequence of each segment of the segmented data.
  • the columnar database processing device processes the data in the columnar database according to the second execution map. All the operators are grouped to generate at least one group of group information, and correspondingly modify the execution process of the grouping information corresponding group according to each group group information in the at least one group of group information, thereby optimizing the execution process of the entire execution map, and finally After optimization, the new execution map processes the data in the column database, thereby reducing the number of data exchanges and swaps in the Cache, improving the utilization of the Cache, and reducing the processing time of the column database processing data.
  • An embodiment of the present invention provides a columnar database processing apparatus. As shown in FIGS. 5 and 6, the columnar database processing apparatus is configured to implement the above-described columnar database processing method.
  • the columnar database processing apparatus 3 includes: a generating module 3 1.
  • the generating module 3 1 is configured to acquire a database operation statement of the columnar database, and generate a first execution map according to the database operation statement.
  • the grouping module 32 is configured to group the operators in the first execution map generated by the generating module 31 to generate at least one group of group information, where each group group information corresponds to one point Group.
  • the processing module 33 is configured to modify an execution process of the first execution map according to the at least one group of group information generated by the grouping module 32 to generate a second execution map.
  • the execution module 34 is configured to process data in the column database according to the second execution map generated by the processing module 33.
  • the columnar database processing apparatus provided by the embodiment of the present invention generates at least one group of group information by grouping all the operators in the execution map, and correspondingly modifies the group information according to each group group information in the at least one group of group information.
  • Corresponding to the execution process of the grouping thereby optimizing the execution process of the entire execution graph, and finally processing the data in the columnar database according to the optimized new execution map, thereby reducing the number of data exchanges and swaps in the Cache, and improving the Cache Utilization, and reduces the processing time for columnar database processing data.
  • the grouping module 32 is specifically configured to: traverse the first execution map, and sequentially determine whether each operator in the first execution map generated by the generating module 3 1 has a barrier feature; if the currently determined operator has a barrier Feature, the current group is ended, the grouping information of the current group is generated, and a new group is generated; if the currently determined operator does not have the barrier feature, the currently determined operator is incorporated into the current group;
  • the barrier feature described above is a specific operation including a user preselection, and the specific operation is any one of the following operations: a selection operation, a multi-table input operation, and an output to a plurality of operator operations.
  • the processing module 33 further includes: a processing unit 33 1 and an integration unit 332, where:
  • the processing unit 33 1 is configured to respectively modify an execution process of the packet corresponding to each group information according to each group information in the at least one group of group information generated by the grouping module 32.
  • the integration unit 332 is configured to modify the processing unit 33 1
  • the execution process of the group corresponding to each component group information is integrated to generate a second execution map.
  • the foregoing group information includes an operator information list, where the operator information list is a relationship table of each operator in the group and an operator type corresponding to each operator, where the operator type is a sequential calculation.
  • the operator information list is a relationship table of each operator in the group and an operator type corresponding to each operator, where the operator type is a sequential calculation.
  • the general operator is Refers to other types of operators except the sequence operator and the multi- ⁇ operator.
  • the foregoing packet information further includes a packet identifier, where the packet identifier in the packet information is a sequence identifier indicating that operators in the packet information corresponding group are sequential operators, and the group identifier in the packet information is a multi-digit identifier indicating The operator in the grouping information corresponding grouping includes a multi-tune operator, and the grouping information does not include the grouping identifier, indicating that the operators in the grouping information corresponding to the grouping information are general operators.
  • processing unit 33 is specifically configured to:
  • the group identifier in the first group information is a sequence identifier
  • segmentation processing is performed on each column of the column database, and each segment in the packet corresponding to the first group information is segmented according to each segment of data. The order of processing is processed in turn.
  • the merging operator is called, and all operators of the group corresponding to the first group information are replaced with merging operators.
  • the execution process of the packet corresponding to the first packet information is not modified.
  • the first group information is one group information of at least one group of group information.
  • the processing unit 33 is specifically configured to: if the group identifier in the first group information is a multiple identifier, invoke the merge operator from the information mapping table according to all the multi-manipulators of the first group, and use the combined calculation The sub-substitution replaces all the operators in the first group; wherein the information mapping table described above is a mapping relationship table between the multi-tune operator and the merging operator.
  • the merging operator is a sequence operator
  • the processing unit 33 is further configured to: after calling the merge operator, and replacing all the operators of the group corresponding to the first group information with the merge operator, segmenting each column of data in the column database, And through the combination operator, the processing is sequentially performed in the order of each piece of data after segmentation.
  • processing unit 33 is specifically configured to:
  • each column of data of the columnar database is segmented, and each operator in the packet corresponding to the first grouping information is sequentially processed according to the order of each segment of the segmented data.
  • the merging operator is called, and all the operators of the group corresponding to the first group information are replaced with the merging operator.
  • the execution process of the packet corresponding to the first group information is not modified.
  • the first group information is one group information of at least one group of group information.
  • the columnar database processing apparatus provided by the embodiment of the present invention generates at least one group of group information by grouping all the operators in the execution map, and correspondingly modifies the group information according to each group group information in the at least one group of group information.
  • Corresponding to the execution process of the grouping thereby optimizing the execution process of the entire execution graph, and finally processing the data in the columnar database according to the optimized new execution map, thereby reducing the number of data exchanges and swaps in the Cache, and improving the Cache Utilization, and reduces the processing time for columnar database processing data.
  • An embodiment of the present invention provides a columnar database processing apparatus.
  • the columnar database processing apparatus is configured to implement the above-described columnar database processing method, and the columnar database processing apparatus may be run on a common server.
  • the database management system specifically, the column database processing device 4 includes: a processor 41 and a memory 42.
  • the processor 41 is connected to other components by a bus.
  • the bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an extended industry standard body. Extended Industry Standard Architecture (EISA) bus.
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 7, but it does not mean that there is only one bus or one type of bus. among them:
  • the processor 41 can be: a central procession unit (CPU), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic device.
  • the memory 42 can be any available medium that can be accessed by a computer, including but not limited to: random access memory (RAM), or disk storage, flash memory, programmable read only memory, or electrically erasable. Programmable memories, registers, etc., are storage media that are well known in the art.
  • the memory stores execution instructions, and when the columnar database processing device is in operation, the processor is in communication with the memory, and the processor 41 executes the execution instructions such that the columnar data processing device performs the following method:
  • the operators in the first execution map are grouped to generate at least one group of group information, wherein each group group information corresponds to one group.
  • the execution process of the first execution map is modified according to the at least one group of group information to generate a second execution map.
  • the data in the columnar database is processed according to the second execution map.
  • grouping the operators in the first execution map to generate at least one group of group information including: traversing the first execution map, and sequentially determining each calculation in the first execution map Whether the sub-function has a barrier feature; if the currently-determined operator has a barrier feature, the current packet is ended, the packet information of the current packet is generated, the packet information is stored in the memory 42, and a new packet is generated; if the currently-determined operator does not have The barrier feature then incorporates the currently determined operator into the current packet.
  • the foregoing barrier feature is a specific operation including a user preselection, and the specific operation is any one of the following operations: a selection operation, a multi-table input operation, and an output maximum Operator operation.
  • the foregoing group information includes an operator information list, where the operator information list is a relationship table of each operator in the group and an operator type corresponding to each operator, where the operator type is a sequential calculation.
  • the foregoing packet information further includes a packet identifier, where the packet identifier in the packet information is a sequence identifier indicating that operators in the packet information corresponding group are sequential operators, and the group identifier in the packet information is a multi-digit identifier indicating The operator in the grouping information corresponding grouping includes a multi-tune operator, and the grouping information does not include the grouping identifier, indicating that the operators in the grouping information corresponding to the grouping information are general operators.
  • the modifying the execution process of the first execution map according to the at least one group of group information, and generating the second execution map includes: separately modifying, according to each group information in the at least one group of group information An execution process of the packet corresponding to each group information; integrating the execution process of the group corresponding to each of the modified group information to generate a second execution map.
  • the execution process of the packet corresponding to each group information is separately modified according to each group information in the at least one group of group information, including:
  • the group identifier in the first group information is a sequence identifier
  • segmentation processing is performed on each column of the column database, and each segment in the packet corresponding to the first group information is segmented according to each segment of data. The order of processing is processed in turn.
  • the merging operator is called, and all operators of the group corresponding to the first group information are replaced with merging operators.
  • the execution process of the packet corresponding to the first packet information is not modified.
  • the first group information is one group information of at least one group of group information.
  • the merge operator is invoked, and all operators of the group corresponding to the first group information are replaced by a merge operator. And including: if the group identifier in the first group information is a multi- ⁇ identifier, calling the merge operator from the information mapping table according to all multi-managers of the first group, and replacing all the first group in the first group by using the merge operator An operator; wherein the information mapping table is a mapping table of a multi-tune operator and a merging operator.
  • the merging operator is a sequence operator
  • the method further includes: segmenting each column of data of the columnar database, and The processing is performed sequentially by the combining operator according to the order of each piece of data after segmentation.
  • the execution process of the packet corresponding to each group information is separately modified according to each group information in the at least one group of group information, including: if the first group information is in the operator information list All the operators are sequential operators, and each column of the column database is segmented, and each operator in the group corresponding to the first group information is sequentially followed by each segment of the segmented data. Process it.
  • the merging operator is called, and all the operators of the group corresponding to the first group information are replaced with the merging operator.
  • the execution process of the packet corresponding to the first group information is not modified.
  • the first group information is one of the at least one group of group information.
  • the columnar database processing apparatus provided by the embodiment of the present invention generates at least one group of group information by grouping all the operators in the execution map, and correspondingly modifies the group information according to each group group information in the at least one group of group information.
  • Corresponding group execution Process thereby optimizing the execution process of the entire execution graph, and finally processing the data in the columnar database according to the optimized new execution map, thereby reducing the number of data exchanges and swaps in the cache, and improving the utilization of the cache, and Reduced processing time for columnar database processing data.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the modules or units is only a logical function division.
  • there may be another division manner for example, multiple units or components may be used. Combined or can be integrated into another system, or some features can be ignored, or not executed.
  • the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be electrical, mechanical or otherwise.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, i.e., may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the embodiment of the present embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be in the form of hardware Implementation can also be implemented in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • the instructions include a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a removable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and the like, which can store program code. .

Landscapes

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

Abstract

本发明公开了一种列式数据库处理方法及装置,涉及数据分析领域,能够提高Cache的利用率,并降低列式数据库处理数据的处理时间。具体的实现方法包括:获取列式数据库的数据库操作语句,并根据数据库操作语句生成第一执行图;将该第一执行图中的所有算子进行分组,生成至少一组分组信息;其中每组分组信息对应一个分组;根据至少一组分组信息修改第一执行图的执行过程,生成第二执行图;按照第二执行图处理该列式数据库中的数据。本发明应用于列式数据库中数据的处理。

Description

一种列式数据库处理方法及装置 技术领域
涉及数据分析领域, 尤其涉及一种列式数据库处理方法及装 置。 背景技术
在数据 分析领 域 的 联机分析 处 理 ( Online Analytical Processing , 简称 OLAP ) 场景中, 由于列式数据库比行式数据库更 适用于该 OLAP场景,使得列式数据库成为现今数据分析领域 OLAP 场景的最热门的数据库技术。 列式数据库在进行数据存储时, 通常 是先将用户定义的数据表分成多列, 每列单独形成一个文件。 这样 在进行大量数据分析时, 列式数据库只需读取查询语句中的列就可 以了, 所以当数据量比较大的时候, 处理的效率会比较高。
然而, 发明人发现, 列式数据库虽然存在上述的优点, 但是当 对数据库的数据进行处理时, 由于列式数据库的算子 ( operator ) — 次是处理一列数据, 需要数据在 Cache 多次的换入换出, 使得緩存 Cache 利用率较低。 并且当一列数据的大小超过 Cache 的大小时, 会将列的数据库从 Cache 中写入内存, 然后重新载入 Cache 中, 这 样增加了列式数据库处理数据的处理时间。 因此, 如何提高 Cache 的利用率, 以及如何减少列式数据库处理数据的处理时间, 是目前 业界期待解决的问题。 发明内容
本发明的实施例提供一种列式数据库处理方法及装置, 能够提 第一方面, 提供一种列式数据库处理方法, 包括:
获取列式数据库的数据库操作语句, 并根据所述数据库操作语 句生成第一执行图;
将所述第一执行图中的算子进行分组, 生成至少一组分组信 息, 其中每组分组信息对应一个分组;
根据所述至少一组分组信 , 修改所述第一执行图的执行过程, 生成第二执行图;
按照所述第二执行图处理所述列式数据库中的数据。
在第一方面的第一种可能的实现方式中, 所述将所述第一执行 图中的算子进行分组, 生成至少一组分组信息, 包括:
遍历所述第一执行图, 依次判断所述第一执行图中的每个算子 是否具备屏障特征;
若当前判断的算子具备屏障特征, 则结束当前分组, 生成所述 当前分组的分组信息, 并生成新的分组;
若所述当前判断的算子不具备屏障特征, 则将所述当前判断的 算子并入所述当前分组中;
其中, 所述屏障特征为包含用户预选的特定操作, 所述特定操 作为以下操作中的任意一个: 选择操作、 多表输入操作、 输出到多 个算子操作。
结合第一方面或第一方面的第一种可能的实现方式, 在第二种 可能的实现方式中, 所述根据所述至少一组分组信息修改所述第一 执行图的执行过程, 生成第二执行图包括:
根据所述至少一组分组信息中的各分组信息分别修改所述每 个分组信息对应的分组的执行过程;
将修改后的所述每个分组信息对应的分组的执行过程进行整 合, 生成所述第二执行图。
结合第一方面的第二种可能的实现方式, 在第三种可能的实现 方式中, 所述分组信息包括算子信息列表, 所述算子信息列表为所 述分组内的各算子以及每个算子对应的算子类型的关系表, 其中, 所述算子类型为顺序算子、 多趟算子或一般算子, 所述一般算子是 指除顺序算子、 多趟算子以外的其他类型的算子。 结合第一方面的第三种可能的实现方式, 在第四种可能的实现 方式中, 所述分组信息还包括分组标识; 其中, 若所述分组标识为 顺序标识则表明所述分组信息对应分组中的算子均为顺序算子, 若 所述分组标识为多趟标识则表明所述分组信息对应分组中的算子包 含多趟算子, 若所述分组信息不包含分组标识则表明所述分组信息 对应分组中的算子均为一般算子。
结合第一方面的第四种可能的实现方式, 在第五种可能的实现 方式中, 所述根据所述至少一组分组信息中的各分组信息分别修改 所述每个分组信息对应的分组的执行过程, 包括:
若第一分组信息中的分组标识为顺序标识, 则对所述列式数据 库的每列数据进行分段处理, 并通过所述第一分组信息对应的分组 中的每个算子按照分段后的每段数据的先后顺序依次进行处理; 或者,
若所述第一分组信息中的分组标识为多趟标识, 则调用合并算 子, 并将所述第一分组信息对应的分组的所有算子替换为所述合并 算子;
或者,
若所述第一分组信息中不包含分组标识, 则不修改所述第一分 组信息对应的分组的执行过程;
其中, 所述第一分组信息为所述至少一组分组信息中的一个分 组信息。
结合第一方面的第五种可能的实现方式, 在第六种可能的实现 方式中, 所述若所述第一分组信息中的分组标识为多趟标识, 则调 用合并算子, 并将所述第一分组信息对应的分组的所有算子替换为 所述合并算子, 包括:
若所述第一分组信息中的分组标识为多趟标识, 则根据所述第 一分组的所有多趟算子从信息映射表中调用所述合并算子, 并利用 所述合并算子替换所述第一分组中的所有算子; 其中, 所述信息映 射表为多趟算子与合并算子的映射关系表。 结合第一方面的第五种可能的实现方式或第六种可能的实现 方式, 在第七种可能的实现方式中, 若所述合并算子为顺序算子, 则
所述调用合并算子, 并将所述第一分组信息对应的分组的所有 算子替换为所述合并算子之后, 还包括:
对所述列式数据库的每列数据进行分段处理, 并通过所述合并 算子按照分段后每段数据的先后顺序依次进行处理。
结合第一方面的第四种可能的实现方式, 在第八种可能的实现 方式中, 所述根据所述至少一组分组信息中的各分组信息分别修改 所述每个分组信息对应的分组的执行过程, 包括:
若所述第一分组信息中算子信息列表中的所有算子均为顺序 算子, 则对所述列式数据库的每列数据进行分段处理, 并通过所述 第一分组信息对应的分组中的每个算子按照分段后的每段数据的先 后顺序依次进行处理;
或者,
若所述第一分组信息中算子信息列表中的算子包含多趟算子, 则调用合并算子, 并将所述第一分组信息对应的分组的所有算子替 换为所述合并算子;
或者,
若所述第一分组信息中算子信息列表中的算子为一般算子, 则 不修改所述第一分组信息对应的分组的执行过程;
其中, 所述第一分组信息为所述至少一组分组信息中的一个分 组信息。
第二方面, 提供一种列式数据库处理装置, 包括:
生成模块, 用于获取列式数据库的数据库操作语句, 并根据所 述数据库操作语句生成第一执行图;
分组模块, 用于将所述第一执行图中的算子进行分组, 生成至 少一组分组信息, 其中每组分组信息对应一个分组;
处理模块, 用于根据所述分组模块生成的至少一组分组信息修 改所述第一执行图的执行过程, 生成第二执行图;
执行模块, 用于按照所述第二执行图处理所述列式数据库中的 数据。
在第二方面的第一种可能的实现方式中, 所述分组模块具体用 于: 遍历所述第一执行图, 依次判断所述第一执行图中的每个算子 是否具备屏障特征; 若当前判断的算子具备屏障特征, 则结束当前 分组, 生成所述当前分组的分组信息, 并生成新的分组; 若所述当 前判断的算子不具备屏障特征, 则将所述当前判断的算子并入所述 当前分组中;
其中, 所述屏障特征为包含用户预选的特定操作, 所述特定操 作为以下操作中的任意一个: 选择操作、 多表输入操作、 输出到多 个算子操作。
结合第二方面或第二方面的第一种可能的实现方式, 在第二种 可能的实现方式中, 所述处理模块包括:
处理单元, 用于根据所述分组模块生成的所述至少一组分组信 息中的各分组信息分别修改所述每个分组信息对应的分组的执行过 程;
整合单元, 用于将修改后的所述每个组分组信息对应的分组的 执行过程进行整合, 生成所述第二执行图。
结合第二方面的第二种可能的实现方式, 在第三种可能的实现 方式中, 所述分组信息包括算子信息列表, 所述算子信息列表为所 述分组内的各算子以及每个算子对应的算子类型的关系表, 其中, 所述算子类型为顺序算子、 多趟算子或一般算子, 所述一般算子是 指除顺序算子、 多趟算子以外的其他类型的算子。
结合第二方面的第三种可能的实现方式, 在第四种可能的实现 方式中, 所述分组信息还包括分组标识; 其中, 若所述分组标识为 顺序标识则表明所述分组信息对应分组中的算子均为顺序算子, 若 所述分组标识为多趟标识则表明所述分组信息对应分组中的算子包 含多趟算子, 若所述分组信息不包含分组标识则表明所述分组信息 对应分组中的算子均为一般算子。
根据第二方面的第四种可能的实现方式, 在第五种可能的实现 方式中, 所述处理单元具体用于:
若第一分组信息中的分组标识为顺序标识, 则对所述列式数据 库的每列数据进行分段处理, 并通过所述第一分组信息对应的分组 中的每个算子按照分段后的每段数据的先后顺序依次进行处理; 或者,
若所述第一分组信息中的分组标识为多趟标识, 则调用合并算 子, 并将所述第一分组信息对应的分组的所有算子替换为所述合并 算子;
或者,
若所述第一分组信息中不包含分组标识, 则不修改所述第一分 组信息对应的分组的执行过程;
其中, 所述第一分组信息为所述至少一组分组信息中的一个分 组信息。
结合第二方面的第五种可能的实现方式, 在第六种可能的实现 方式中, 所述若所述第一分组信息中的分组标识为多趟标识, 则调 用合并算子, 并将所述第一分组信息对应的分组的所有算子替换为 所述合并算子, 具体为用于:
若所述第一分组信息中的分组标识为多趟标识或所述第一分 组信息中算子信息列表中的算子包含多趟算子, 则根据所述第一分 组的所有多趟算子从信息映射表中调用所述合并算子, 并利用所述 合并算子替换所述第一分组中的所有算子; 其中, 所述信息映射表 为多趟算子与合并算子的映射关系表。
结合第二方面的第五种可能的实现方式或第六种可能的实现 方式, 在第七种可能的实现方式中, 若所述合并算子为顺序算子, 则
所述处理单元, 还用于在调用合并算子, 并将所述第一分组信 息对应的分组的所有算子替换为所述合并算子之后, 对所述列式数 据库的每列数据进行分段处理, 并通过所述合并算子按照分段后每 段数据的先后顺序依次进行处理。
结合第二方面的第四种可能的实现方式, 在第八种可能的实现 方式中, 所述处理单元具体用于:
若所述第一分组信息中算子信息列表中的所有算子均为顺序 算子, 则对所述列式数据库的每列数据进行分段处理, 并通过所述 第一分组信息对应的分组中的每个算子按照分段后的每段数据的先 后顺序依次进行处理;
或者,
若所述第一分组信息中算子信息列表中的算子包含多趟算子, 则调用合并算子, 并将所述第一分组信息对应的分组的所有算子替 换为所述合并算子;
或者,
若所述第一分组信息中算子信息列表中的算子为一般算子, 则 不修改所述第一分组信息对应的分组的执行过程;
其中, 所述第一分组信息为所述至少一组分组信息中的一个分 组信息。
第三方面, 提供一种列式数据库处理装置, 包括处理器和存储 器, 所述存储器存储执行指令, 当所述装置运行时, 所述处理器与 所述存储器之间通信, 所述处理器执行所述执行指令使得所述装置 执行 ¾口下方法:
获取列式数据库的数据库操作语句, 并根据所述数据库操作语 句生成第一执行图;
将所述第一执行图中的算子进行分组, 生成至少一组分组信 息, 其中每组分组信息对应一个分组;
根据所述至少一组分组信 , 修改所述第一执行图的执行过程, 生成第二执行图;
按照所述第二执行图处理所述列式数据库中的数据。
在第三方面的第一种可能的实现方式中, 所述处理器执行的方 法中, 所述将所述第一执行图中的算子进行分组, 生成至少一组分 组信息, 包括: 遍历所述第一执行图, 依次判断所述第一执行图中 的每个算子是否具备屏障特征; 若当前判断的算子具备屏障特征, 则结束当前分组, 生成所述当前分组的分组信息, 将所述分组信息 存入所述存储器, 并生成新的分组; 若所述当前判断的算子不具备 屏障特征, 则将所述当前判断的算子并入所述当前分组中;
其中, 所述屏障特征为包含用户预选的特定操作, 所述特定操 作为以下操作中的任意一个: 选择操作、 多表输入操作、 输出到多 个算子操作。
结合第三方面或第三方面的第一种可能的实现方式, 在第二种 可能的实现方式中, 所述处理器执行的所述方法中, 所述根据所述 至少一组分组信息修改所述第一执行图的执行过程, 生成第二执行 图包括: 根据所述至少一组分组信息中的各分组信息分别修改所述 每个分组信息对应的分组的执行过程; 将修改后的所述每个分组信 息对应的分组的执行过程进行整合, 生成所述第二执行图。
结合第三方面的第二种可能的实现方式, 在第三种可能的实现 方式中, 所述分组信息包括算子信息列表, 所述算子信息列表为所 述分组内的各算子以及每个算子对应的算子类型的关系表, 其中, 所述算子类型为顺序算子、 多趟算子或一般算子, 所述一般算子是 指除顺序算子、 多趟算子以外的其他类型的算子。
结合第三方面的第三种可能的实现方式, 在第四种可能的实现 方式中, 所述分组信息还包括分组标识; 其中, 若所述分组标识为 顺序标识则表明所述分组信息对应分组中的算子均为顺序算子, 若 所述分组标识为多趟标识则表明所述分组信息对应分组中的算子包 含多趟算子, 若所述分组信息不包含分组标识则表明所述分组信息 对应分组中的算子均为一般算子。
结合第三方面的第四种可能的实现方式, 在第五种可能的实现 方式中, 所述处理器执行的所述方法中, 所述根据所述至少一组分 组信息中的各分组信息分别修改所述每个分组信息对应的分组的执 行过程, 包括:
若第一分组信息中的分组标识为顺序标识, 则对所述列式数据 库的每列数据进行分段处理, 并通过所述第一分组信息对应的分组 中的每个算子按照分段后的每段数据的先后顺序依次进行处理; 或者,
若所述第一分组信息中的分组标识为多趟标识, 则调用合并算 子, 并将所述第一分组信息对应的分组的所有算子替换为所述合并 算子;
或者,
若所述第一分组信息中不包含分组标识, 则不修改所述第一分 组信息对应的分组的执行过程;
其中, 所述第一分组信息为所述至少一组分组信息中的一个分 组信息。
结合第三方面的第五种可能的实现方式, 在第六种可能的实现 方式中, 所述处理器执行的所述方法中, 所述若所述第一分组信息 中的分组标识为多趟标识, 则调用合并算子, 并将所述第一分组信 息对应的分组的所有算子替换为所述合并算子, 包括: 若所述第一 分组信息中的分组标识为多趟标识, 则根据所述第一分组的所有多 趟算子从信息映射表中调用所述合并算子, 并利用所述合并算子替 换所述第一分组中的所有算子; 其中, 所述信息映射表为多趟算子 与合并算子的映射关系表。
结合第三方面的第五种可能的实现方式或第六种可能的实现 方式, 在第七种可能的实现方式中, 若所述合并算子为顺序算子, 则
所述处理器执行的所述方法中, 所述调用合并算子, 并将所述 第一分组信息对应的分组的所有算子替换为所述合并算子之后, 还 包括: 对所述列式数据库的每列数据进行分段处理, 并通过所述合 并算子按照分段后每段数据的先后顺序依次进行处理。
结合第三方面的第四种可能的实现方式, 在第八种可能的实现 方式中, 所述处理器执行的所述方法中, 所述根据所述至少一组分 组信息中的各分组信息分别修改所述每个分组信息对应的分组的执 行过程, 包括:
若所述第一分组信息中算子信息列表中的所有算子均为顺序 算子, 则对所述列式数据库的每列数据进行分段处理, 并通过所述 第一分组信息对应的分组中的每个算子按照分段后的每段数据的先 后顺序依次进行处理;
或者,
若所述第一分组信息中算子信息列表中的算子包含多趟算子, 则调用合并算子, 并将所述第一分组信息对应的分组的所有算子替 换为所述合并算子;
或者,
若所述第一分组信息中算子信息列表中的算子为一般算子, 则 不修改所述第一分组信息对应的分组的执行过程;
其中, 所述第一分组信息为所述至少一组分组信息中的一个分 组信息。 行图中所有的算子进行分组, 生成至少一组分组信息, 并根据该至 少一组分组信息修改执行图的执行过程, 从而优化了整个执行图的 执行过程, 最后根据优化后新的执行图处理该列式数据库中的数据, 从而减少数据在 Cache中的换入换出次数, 提高了 Cache的利用率, 并降低了列式数据库处理数据的处理时间。 附图说明
为了更清楚地说明本发明实施例或现有技术中的技术方案, 下 面将对实施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些实施例, 对于 本领域普通技术人员来讲, 在不付出创造性劳动的前提下, 还可以 根据这些附图获得其他的附图。 图 1为本发明的实施例提供的一种列式数据库处理方法的流程 示意图;
图 2为本发明的实施例提供的另一种列式数据库处理方法的流 程示意图;
图 3为本发明的实施例提供的一种算子处理分组后的列数据示 意图;
图 4为本发明的实施例提供的一种合并分组中算子的示意图; 图 5为本发明的实施例提供的一种列式数据库处理装置的结构 示意图;
图 6为本发明的实施例提供的另一种列式数据库处理装置的结 构示意图;
图 7为本发明的另一实施例提供的一种列式数据库处理装置的 结构示意图。 具体实施方式
下面将结合本发明实施例中的附图, 对本发明实施例中的技术 方案进行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明 一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本 领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他 实施例, 都属于本发明保护的范围。
列式数据库是现今数据分析领域最热门的数据库技术之一, 并 且该列式数据库在对数据进行处理时, 通常都是运行在普通服务器 上的数据库管理系统中, 数据库管理系统首先会将用户提交的 SQL ( Structured Query Language , 结构化查询语言)转换成一个执行 4对, 然后进一步的将该执行树翻译为一个执行图, 该执行图中的每个节 点即称为一个算子, 每个算子会处理一个或多个完整的列。 并且由 于列式数据库在处理数据时, 一次仅处理一列, 需要数据在 Cache 中多次的换入换出, 使得 Cache緩存的利用率不高, 而基于上述的 应用场景, 本发明提供了一种新的列式数据库处理方法。 如图 1所示,本发明的实施例提供的一种列式数据库处理方法, 具体包括如下步骤:
101、 列式数据库处理装置获取该列式数据库的数据库操作语 句, 并根据数据库操作语句生成第一执行图。
具体的, 列式数据库处理装置在获取到用户提交的 SQL 语言 后, 根据语法将该 SQL语句解析成对应的执行树。 此时, 由于一个 SQL 查询语句通过编译分解后, 可能存在一些效率不高的操作, 因 此, 在生成执行树后根据既有的规则对这棵执行树进行优化, 如进 行 select 下推, 重复算子的合并等功能, 从而降低了整个执行树的 计算强度。 完成对这棵执行树的优化后, 进一步的, 将该执行树翻 译成一张执行图, 该执行图的每个节点都对应一个算子, 而每个算 子都对应一个可执行的函数, 使得该列式数据库处理装置按照该执 行图进行函数调用, 从而完成结果输出。
102、 列式数据库处理装置将第一执行图中的算子进行分组, 生成至少一组分组信息。
其中, 上述的至少一组分组信息中的每组分组信息分别对应一 个分组。 而上述的分组信息至少包括算子信息列表, 该算子信息列 表为该分组内的各算子以及每个算子对应的算子类型的关系表, 可 以为一个线性表结构, 具体的, 该算子信息列表可以是一个算子与 算子类型的映射关系表, 且每个表节点存储一个算子的算子信息, 而该算子信息包括该算子的算子类型; 上述的算子类型包括顺序算 子、 多趟算子和一般算子这三种类型。 其中, 上述的顺序算子是指 在对每列数据进行分段处理 (这里的分段处理指的是将一列数据分 为多段, 算子依次对每段数据进行处理) 之后, 经过简单合并就能 得到结果的算子; 而多趟算子是指不能简单通过分段处理之后, 合 并就能得到结果的算子, 如, group by , order , j oin等; 而该一般算 子是指除顺序算子、 多趟算子以外的其他类型的算子。
进一步的, 上述的分组信息还可以包括分组标识。 其中, 当该 分组信息中的分组标识为顺序标识时, 则表明该分组信息对应分组 中的算子均为顺序算子; 当该分组信息中的分组标识为多趟标识时, 则表明该分组信息对应分组中的算子包含多趟算子; 当该分组信息 不包含分组标识时, 则表明该分组信息对应分组中的算子均为一般 算子。
103、 列式数据库处理装置根据至少一组分组信息修改第一执 行图的执行过程, 生成第二执行图。
具体的, 按照每组分组信息对应分组中算子的算子类型, 对每 个分组的执行过程做不同的修改, 如, 对列式数据库的每列数据进 行分段, 或将分组中所有的算子进行合并。
104、 列式数据库处理装置按照第二执行图处理该列式数据库 中的数据。 所有的算子进行分组, 生成至少一组分组信息, 并根据该至少一组 分组信息中每组分组信息对应修改该分组信息对应分组的执行过 程, 从而优化了整个执行图的执行过程, 最后根据优化后新的执行 图处理该列式数据库中的数据, 从而减少数据在 Cache 中的换入换 出次数, 提高了 Cache 的利用率, 并降低了列式数据库处理数据的 处理时间。
本发明的实施例提供了一种列式数据库处理方法,如图 2所示, 该方法具体包括如下步骤:
201、 列式数据库处理装置获取列式数据库的数据库操作语句 , 并根据数据库操作语句生成第一执行图。
具体的, 列式数据库处理装置在获取到用户提交的 SQL 查询 语句后, 根据语法将该 SQL语句解析成对应的执行树。 此时, 由于 一个 SQL查询语句通过编译分解后,可能存在一些效率不高的操作 , 因此, 在生成执行树后根据既有的规则对这棵执行树进行优化, 如 进行 select 下推, 重复算子的合并等功能, 从而降低了整个执行树 的计算强度。 完成对这棵执行树的优化后, 进一步的, 将该执行树 翻译成一张执行图, 该执行图的每个节点都对应一个 operator算子, 而每个算子都对应一个可执行的函数, 使得该列式数据库处理装置 按照该执行图进行函数调用, 从而完成结果输出。
202、 列式数据库处理装置将该第一执行图中的所有算子进行 分组, 生成至少一组分组信息。
可选的, 步骤 202具体包括如下步骤:
202a , 列式数据库处理装置遍历该第一执行图, 依次判断第一 执行图中的每个算子是否具备屏障特征。
其中, 该屏障特征为特殊算子的算子特征。 该特殊算子为包含 有用户根据实际应用场景或用户根据实际输入的查询语句预先挑选 出的具有特定操作的算子, 即该屏障特征为包含用户预选的特定操 作。 具体的, 上述特定操作为以下操作中的任意一个: 选择操作, 如, select算子, 多表输入操作, 如, j oin算子, 输出到多个算子操 作。 需要说明的是, 上述的三种特定操作在这里只是一种示例, 实 际应用时并不限于此。
若当前判断的算子具备屏障特征, 则转到步骤 202b , 若当前判 断的算子不具备屏障特征, 则转到步骤 202c。
202b , 若当前判断的算子具备屏障特征, 则列式数据库处理装 置结束当前分组, 生成当前分组的分组信息, 并生成新的分组。
202c , 若当前判断的算子不具备屏障特征, 则列式数据库处理 装置将当前判断的算子并入当前分组中。
具体的, 在对步骤 201所生成的第一执行图中所有的算子进行 分组时, 是按照上述第一执行图中算子的先后顺序依次判断该执行 图中的算子是否具备屏障特征。 具体的, 列式数据库处理装置在对 该第一执行图中的所有算子进行分组时, 首先, 初始化一个第一分 组, 然后, 依次判断该第一执行图中的每个算子是否具备屏障特征, 当判断出第二个具备屏障特征的算子时, 则结束第一分组, 生成该 第一分组对应的分组信息, 以及生成第二分组, 并将该第二个具备 屏障特征的算子存入该第二分组中, 随后, 依次判断剩余算子, 将 剩余算子进行分组。 此外, 上述的至少一组分组信息中的每组分组信息分别对应一 个分组。 而上述的分组信息至少包括算子信息列表, 该算子信息列 表为该分组内的各算子以及每个算子对应的算子类型的关系表, 可 以为一个线性表结构, 具体的, 该算子信息列表可以是一个算子与 算子类型的映射关系表, 且每个表节点存储一个算子的算子信息, 而该算子信息包括该算子的算子类型; 上述的算子类型包括顺序算 子、 多趟算子和一般算子这三种类型。 其中, 上述的顺序算子是指 在对每列数据进行分段处理 (这里的分段处理指的是将一列数据分 为多段, 算子依次对每段数据进行处理) 之后, 经过简单合并就能 得到结果的算子; 而多趟算子是指不能简单通过分段处理之后, 合 并就能得到结果的算子, 如, group by , order , j oin等; 而该一般算 子是指除顺序算子、 多趟算子以外的其他类型的算子。
进一步的, 上述的分组信息还可以包括分组标识。 其中, 当该 分组信息中的分组标识为顺序标识时, 则表明该分组信息对应分组 中的算子均为顺序算子; 当该分组信息中的分组标识为多趟标识时, 则表明该分组信息对应分组中的算子包含多趟算子; 当该分组信息 不包含分组标识时, 则表明该分组信息对应分组中的算子均为一般 算子。
203、 列式数据库处理装置根据该至少一组分组信息修改第一 执行图的执行过程, 生成第二执行图。
具体的, 按照每组分组信息对应分组中算子的算子类型, 依次 对每个分组的执行过程做不同的修改, 如, 对列式数据库的每列数 据进行分段, 或将分组中所有的算子进行合并。
可选的, 步骤 203具体包括如下步骤:
203 a , 列式数据库处理装置根据至少一组分组信息中的各分组 信 , ¾修改每个分组信息对应的分组的执行过程。
203b , 列式数据库处理装置将修改后的每个组分组信息对应的 分组的执行过程进行整合, 生成第二执行图。
进一步, 可选的, 步骤 203 a具体包括如下步骤: 203 a l、 若第一分组信息中的分组标识为顺序标识或第一分组 信息中算子信息列表中的所有算子均为顺序算子, 则列式数据库处 理装置对列式数据库的每列数据进行分段处理, 并通过第一分组信 息对应的分组中的每个算子按照分段后的每段数据的先后顺序依次 进行处理。
具体的, 当第一分组中的算子均为顺序算子时, 则表明该第一 分组可以在对列数据进行分段处理后, 经过简单合并便可得到执行 结果。 因此, 当第一分组中的算子均满足顺序算子的条件, 则改变 该第一分组的执行过程。 具体的, 如图 3 所示的算子处理分组后的 列数据示意图, 该第一分组的执行过程的修改流程为: 首先, 将该 列式数据库中的每列数据进行分段, 且每列数据分段的结果相同; 然后, 按照该执行图中所有算子的先后顺序依次并行处理该列式数 据库的每列数据, 需要说明的是, 该执行图中的每个算子在对该列 式数据库中的每列数据并行处理时, 是按照每列数据在分段后得到 的每段数据的先后顺序依次对每列数据的同一段数据进行处理。
此外, 由于分段后的列数据的大小能够在 CPU 的数据 Cache 中完全存在, 且多个算子之间切换时 Cache中的数据无需写入内存, 极大的减少了 内存总线的消耗。 此外, CPU对 Cache 中数据的读写 速度是内存中的 10倍左右, 因此, 对列式数据库的列数据进行分段 操作, 减少数据在 Cache 中的换入换出次数, 明显的提高了 Cache 的利用率, 并降低了处理列式数据库数据的时间。
或者,
203 a2、 若第一分组信息中的分组标识为多趟标识或第一分组 信息中算子信息列表中的算子包含多趟算子, 则列式数据库处理装 置调用合并算子, 并将第一分组信息对应的分组的所有算子替换为 合并算子。
具体的, 当该第一分组中的算子包含多趟算子时, 则说明该第 一分组不能简单利用分段方法来处理数据, 因此, 当该第一分组中 的任意一个满足多趟算子条件后, 修改该第一分组的执行过程。 具 体的, 如图 4 所示的合并分组算子示意图, 该第一分组的执行过程 的修改流程为: 从内存中调用该第一分组中多趟算子对应的合并算 子, 并将该第一分组中所有算子替换为合并算子。
需要说明的是, 合并后的算子同时在做多个操作, 提升了处理 数据的速度和时间。 具体的, 原有的算子是独立处理数据的, 处理 时间是两个算子值相加。 二合并后的算子处理时间是小于原来两个 算子的处理时间直接相加的。 此外, 部分替换后的合并算子是支持 分段操作的, 这样即提高了 Cache 的利用率, 也降低了处理数据的 处理时间。
或者,
203 a3、 若第一分组信息中不包含分组标识第一分组信息中算 子信息列表中的算子为一般算子, 则列式数据库处理装置不修改第 一分组信息对应的分组的执行过程。
需要说明的是, 上述的第一分组信息为该至少一组分组信息中 的一个分组信息, 即上述的步骤 203 a l、 203 a2、 及 203 a3具体描述 的是上述至少一个分组中的任一分组对应的执行过程的修改过程。
进一步, 可选的, 步骤 203 a2具体包括如下过程:
若第一分组信息中的分组标识为多趟标识或第一分组信息中 算子信息列表中的算子包含多趟算子, 则列式数据库处理装置根据 第一分组的所有多趟算子从信息映射表中调用合并算子, 并利用合 并算子替换第一分组中的所有算子。
具体的, 在调用合并算子时, 由于同时实现了多个算子, 因此, 需要进行查表操作, 具体的, 是根据该第一分组中的多趟算子从预 配置的信息映射表中查表获取该多趟算子对应的合并算子, 从而将 该第一分组中的所有算子替换为合并算子。 其中, 上述的信息映射 表为多趟算子与合并算子的映射关系表。 在进行查表时, 可以先将 该第一分组中的多趟算子挑选出来, 在从信息映射表中根据该多趟 算子获取合并算子。 或者, 根据信息映射表中算子的存储顺序, 依 次匹配该第一分组中的算子, 从而调用该合并算子。 例如, 判断该 第一分组是否存在 group by算子, 若存在, 则调用包含该 group by 算子的合并算子; 判断该第一分组是否存在 j oin算子, 若存在, 则 调用包含该 j oin 算子的合并算子; 判断该第一分组是否存在 order 算子, 若存在, 则调用包含该 order算子的合并算子。
可选的, 若该合并算子为顺序算子时, 则该步骤 203b2之后还 包括: 列式数据库处理装置对列式数据库的每列数据进行分段处理, 并通过合并算子按照分段后每段数据的先后顺序依次进行处理。
具体的, 当经过步骤 203b2中的算子调用过程后, 该执行图中 的多趟算子均替换为了合并算子, 因此, 当该合并算子为顺序算子 时, 则该列式数据库处理装置还可以进一步的对列式数据库的每列 数据进行分段, 然后通过该合并算子按照分段后每段数据的先后顺 序依次进行处理。
204、 列式数据库处理装置按照第二执行图处理该列式数据库 中的数据。 所有的算子进行分组, 生成至少一组分组信息, 并根据该至少一组 分组信息中每组分组信息对应修改该分组信息对应分组的执行过 程, 从而优化了整个执行图的执行过程, 最后根据优化后新的执行 图处理该列式数据库中的数据, 从而减少数据在 Cache 中的换入换 出次数, 提高了 Cache 的利用率, 并降低了列式数据库处理数据的 处理时间。
本发明的实施例提供一种列式数据库处理装置, 如图 5、 6 所 示, 该列式数据库处理装置用于实现上述列式数据库处理方法, 该 列式数据库处理装置 3 包括: 生成模块 3 1、 分组模块 32、 处理模块 33和执行模块 34 , 其中:
生成模块 3 1 , 用于获取列式数据库的数据库操作语句, 并根据 数据库操作语句生成第一执行图。
分组模块 32 , 用于将生成模块 3 1生成的第一执行图中的算子 进行分组, 生成至少一组分组信息, 其中每组分组信息对应一个分 组。
处理模块 33 , 用于根据分组模块 32生成的至少一组分组信息 修改第一执行图的执行过程, 生成第二执行图。
执行模块 34 , 用于按照处理模块 33生成的第二执行图处理列 式数据库中的数据。
本发明的实施例提供的列式数据库处理装置, 通过将执行图中 所有的算子进行分组, 生成至少一组分组信息, 并根据该至少一组 分组信息中每组分组信息对应修改该分组信息对应分组的执行过 程, 从而优化了整个执行图的执行过程, 最后根据优化后新的执行 图处理该列式数据库中的数据, 从而减少数据在 Cache 中的换入换 出次数, 提高了 Cache 的利用率, 并降低了列式数据库处理数据的 处理时间。
可选的, 分组模块 32 具体用于: 遍历所述第一执行图, 依次 判断生成模块 3 1 生成的第一执行图中的每个算子是否具备屏障特 征; 若当前判断的算子具备屏障特征, 则结束当前分组, 生成当前 分组的分组信息, 并生成新的分组; 若当前判断的算子不具备屏障 特征, 则将当前判断的算子并入当前分组中;
其中, 上述的屏障特征为包含用户预选的特定操作, 该特定操 作为以下操作中的任意一个: 选择操作、 多表输入操作、 输出到多 个算子操作。
可选的, 如图 6所示, 处理模块 33还包括: 处理单元 33 1 和 整合单元 332 , 其中:
处理单元 33 1 ,用于根据分组模块 32生成的至少一组分组信息 中的各分组信息分别修改每个分组信息对应的分组的执行过程; 整合单元 332 , 用于将处理单元 33 1得到的修改后的每个组分 组信息对应的分组的执行过程进行整合, 生成第二执行图。
可选的, 上述的分组信息包括算子信息列表, 该算子信息列表 为分组内的各算子以及每个算子对应的算子类型的关系表, 其中, 上述的算子类型为顺序算子、 多趟算子或一般算子, 该一般算子是 指除顺序算子、 多趟算子以外的其他类型的算子。
可选的, 上述的分组信息还包括分组标识; 其中, 分组信息中 的分组标识为顺序标识表明分组信息对应分组中的算子均为顺序算 子, 分组信息中的分组标识为多趟标识表明分组信息对应分组中的 算子包含多趟算子, 分组信息不包含分组标识表明分组信息对应分 组中的算子均为一般算子。
可选的, 处理单元 33具体用于:
若第一分组信息中的分组标识为顺序标识, 则对列式数据库的 每列数据进行分段处理, 并通过第一分组信息对应的分组中的每个 算子按照分段后的每段数据的先后顺序依次进行处理。
或者,
若第一分组信息中的分组标识为多趟标识, 则调用合并算子, 并将第一分组信息对应的分组的所有算子替换为合并算子。
或者,
若第一分组信息中不包含分组标识, 则不修改第一分组信息对 应的分组的执行过程。
其中, 上述的第一分组信息为至少一组分组信息中的一个分组 信息。
可选的, 处理单元 33 具体用于: 若第一分组信息中的分组标 识为多趟标识, 则根据第一分组的所有多趟算子从信息映射表中调 用合并算子, 并利用合并算子替换第一分组中的所有算子; 其中, 上述的信息映射表为多趟算子与合并算子的映射关系表。
可选的, 若合并算子为顺序算子, 则
处理单元 33 , 还用于在调用合并算子, 并将所述第一分组信息 对应的分组的所有算子替换为所述合并算子之后, 对列式数据库的 每列数据进行分段处理, 并通过合并算子按照分段后每段数据的先 后顺序依次进行处理。
可选的, 处理单元 33具体用于:
若第一分组信息中算子信息列表中的所有算子均为顺序算子, 则对列式数据库的每列数据进行分段处理, 并通过第一分组信息对 应的分组中的每个算子按照分段后的每段数据的先后顺序依次进行 处理。
或者,
若第一分组信息中算子信息列表中的算子包含多趟算子, 则调 用合并算子, 并将第一分组信息对应的分组的所有算子替换为合并 算子。
或者,
若第一分组信息中算子信息列表中的算子为一般算子, 则不修 改第一分组信息对应的分组的执行过程。
其中, 上述的第一分组信息为至少一组分组信息中的一个分组 信息。
本发明的实施例提供的列式数据库处理装置, 通过将执行图中 所有的算子进行分组, 生成至少一组分组信息, 并根据该至少一组 分组信息中每组分组信息对应修改该分组信息对应分组的执行过 程, 从而优化了整个执行图的执行过程, 最后根据优化后新的执行 图处理该列式数据库中的数据, 从而减少数据在 Cache 中的换入换 出次数, 提高了 Cache 的利用率, 并降低了列式数据库处理数据的 处理时间。
需要说明的是, 本发明以上各个实施例中的列式数据库处理装 置中的各模块及模块中单元的实现方式和交互过程可以参考相应方 法实施例中的相关描述。
本发明的实施例提供一种列式数据库处理装置, 如图 7所示, 该列式数据库处理装置用于实现上述的列式数据库处理方法, 该列 式数据库处理装置可以是运行在普通服务器上的数据库管理系统, 具体的, 该列式数据库处理装置 4 包括: 处理器 41 和存储器 42。 处理器 41与其他各个部件是通过总线连接。 该总线可以是工业标准 体系结构 ( Industry Standard Architecture , 简称 ISA ) 总线、 夕卜部设 备互连 ( Peripheral Component , 简称 PCI ) 总线或扩展工业标准体 系结构 ( Extended Industry Standard Architecture , 简称 EISA ) 总线 等。 该总线可以分为地址总线、 数据总线、 控制总线等。 为便于表 示, 图 7 中仅用一条粗线表示, 但并不表示仅有一根总线或一种类 型的总线。 其中:
处理器 41可以是: 通用中央处理器 ( central procession unit , 简称 CPU )、 专用集成电路 (application specific integrated circuit, 简 称 ASIC)、 现成可编程门阵列 ( FPGA ) 或其他可编程逻辑器件。 该 存储器 42可以是计算机能够存取的任何可用介质, 包括但不限于: 随机存储器 (random access memory,简称 RAM) , 或磁盘存储 ( disk storage ) , 闪存、 可编程只读存储器或电可擦写可编程存储器、 寄存 器等本领域熟悉的存储介质。
存储器存储执行指令, 当列式数据库处理装置运行时, 处理器 与存储器之间通信, 处理器 41执行所述执行指令使得所述列式数据 库处理装置执行如下方法:
获取列式数据库的数据库操作语句, 并根据该数据库操作语句 生成第一执行图。
将第一执行图中的算子进行分组, 生成至少一组分组信息, 其 中每组分组信息对应一个分组。
根据至少一组分组信息修改第一执行图的执行过程, 生成第二 执行图。
按照第二执行图处理列式数据库中的数据。
可选的, 处理器 41 执行的方法中, 将第一执行图中的算子进 行分组, 生成至少一组分组信息, 包括: 遍历第一执行图, 依次判 断第一执行图中的每个算子是否具备屏障特征; 若当前判断的算子 具备屏障特征, 则结束当前分组, 生成当前分组的分组信息, 将分 组信息存入存储器 42 , 并生成新的分组; 若当前判断的算子不具备 屏障特征, 则将当前判断的算子并入当前分组中。
其中, 上述的屏障特征为包含用户预选的特定操作, 该特定操 作为以下操作中的任意一个: 选择操作、 多表输入操作、 输出到多 个算子操作。
可选的, 上述的分组信息包括算子信息列表, 该算子信息列表 为分组内的各算子以及每个算子对应的算子类型的关系表, 其中, 上述的算子类型为顺序算子、 多趟算子或一般算子, 该一般算子是 指除顺序算子、 多趟算子以外的其他类型的算子。
可选的, 上述的分组信息还包括分组标识; 其中, 分组信息中 的分组标识为顺序标识表明分组信息对应分组中的算子均为顺序算 子, 分组信息中的分组标识为多趟标识表明分组信息对应分组中的 算子包含多趟算子, 分组信息不包含分组标识表明分组信息对应分 组中的算子均为一般算子。
可选的, 处理器 41 执行的方法中, 所述根据至少一组分组信 息修改第一执行图的执行过程, 生成第二执行图, 包括: 根据至少 一组分组信息中的各分组信息分别修改每个分组信息对应的分组的 执行过程; 将修改后的每个分组信息对应的分组的执行过程进行整 合, 生成第二执行图。
可选的, 处理器 41 执行的方法中, 根据至少一组分组信息中 的各分组信息分别修改所述每个分组信息对应的分组的执行过程, 包括:
若第一分组信息中的分组标识为顺序标识, 则对列式数据库的 每列数据进行分段处理, 并通过第一分组信息对应的分组中的每个 算子按照分段后的每段数据的先后顺序依次进行处理。
或者,
若第一分组信息中的分组标识为多趟标识, 则调用合并算子, 并将第一分组信息对应的分组的所有算子替换为合并算子。
或者,
若第一分组信息中不包含分组标识, 则不修改第一分组信息对 应的分组的执行过程。
其中, 上述的第一分组信息为至少一组分组信息中的一个分组 信息。 可选的, 处理器 41 执行的方法中, 若第一分组信息中的分组 标识为多趟标识, 则调用合并算子, 并将第一分组信息对应的分组 的所有算子替换为合并算子, 包括: 若第一分组信息中的分组标识 为多趟标识, 则根据第一分组的所有多趟算子从信息映射表中调用 合并算子, 并利用合并算子替换第一分组中的所有算子; 其中, 上 述的信息映射表为多趟算子与合并算子的映射关系表。
可选的, 若合并算子为顺序算子, 则
处理器 41 执行的方法中, 调用合并算子, 并将第一分组信息 对应的分组的所有算子替换为合并算子之后, 还包括: 对列式数据 库的每列数据进行分段处理, 并通过合并算子按照分段后每段数据 的先后顺序依次进行处理。
可选的, 处理器 41 执行的方法中, 根据至少一组分组信息中 的各分组信息分别修改每个分组信息对应的分组的执行过程, 包括: 若第一分组信息中算子信息列表中的所有算子均为顺序算子, 则对列式数据库的每列数据进行分段处理, 并通过第一分组信息对 应的分组中的每个算子按照分段后的每段数据的先后顺序依次进行 处理。
或者,
若第一分组信息中算子信息列表中的算子包含多趟算子, 则调 用合并算子, 并将第一分组信息对应的分组的所有算子替换为合并 算子。
或者,
若第一分组信息中算子信息列表中的算子为一般算子, 则不修 改第一分组信息对应的分组的执行过程。
其中, 上述的第一分组信息为该至少一组分组信息中的一个分 组信息。
本发明的实施例提供的列式数据库处理装置, 通过将执行图中 所有的算子进行分组, 生成至少一组分组信息, 并根据该至少一组 分组信息中每组分组信息对应修改该分组信息对应分组的执行过 程, 从而优化了整个执行图的执行过程, 最后根据优化后新的执行 图处理该列式数据库中的数据, 从而减少数据在 Cache 中的换入换 出次数, 提高了 Cache 的利用率, 并降低了列式数据库处理数据的 处理时间。
需要说明的是, 本发明以上各个实施例中的列式数据库处理装 置中的处理器的实现方式和交互过程可以参考相应方法实施例中的 相关描述。
所属领域的技术人员可以清楚地了解到, 为描述的方便和简 洁, 仅以上述各功能模块的划分进行举例说明, 实际应用中, 可以 根据需要而将上述功能分配由不同的功能模块完成, 即将装置的内 部结构划分成不同的功能模块, 以完成以上描述的全部或者部分功 能。 上述描述的系统, 装置和单元的具体工作过程, 可以参考前述 方法实施例中的对应过程, 在此不再赘述。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统, 装置和方法, 可以通过其它的方式实现。 例如, 以上所描述的装置 实施例仅仅是示意性的, 例如, 所述模块或单元的划分, 仅仅为一 种逻辑功能划分, 实际实现时可以有另外的划分方式, 例如多个单 元或组件可以结合或者可以集成到另一个系统, 或一些特征可以忽 略, 或不执行。 另一点, 所显示或讨论的相互之间的耦合或直接耦 合或通信连接可以是通过一些接口, 装置或单元的间接耦合或通信 连接, 可以是电性, 机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上 分开的, 作为单元显示的部件可以是或者也可以不是物理单元, 即 可以位于一个地方, 或者也可以分布到多个网络单元上。 可以根据 实际的需要选择其中的部分或者全部单元来实现本实施例方案的目 的。
另外, 在本申请各个实施例中的各功能单元可以集成在一个处 理单元中, 也可以是各个单元单独物理存在, 也可以两个或两个以 上单元集成在一个单元中。 上述集成的单元既可以釆用硬件的形式 实现, 也可以釆用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立 的产品销售或使用时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本申请的技术方案本质上或者说对现有技术做出 贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体 现出来, 该计算机软件产品存储在一个存储介质中, 包括若干指令 用以使得一台计算机设备 (可以是个人计算机, 服务器, 或者网络 设备等) 或处理器 ( processor ) 执行本申请各个实施例所述方法的 全部或部分步骤。 而前述的存储介质包括: U 盘、 移动硬盘、 只读 存储器( ROM , Read-Only Memory )、随机存取存储器( RAM , Random Access Memory ) , 磁碟或者光盘等各种可以存储程序代码的介质。
以上所述, 以上实施例仅用以说明本申请的技术方案, 而非对 其限制; 尽管参照前述实施例对本申请进行了详细的说明, 本领域 的普通技术人员应当理解: 其依然可以对前述各实施例所记载的技 术方案进行修改, 或者对其中部分技术特征进行等同替换; 而这些 修改或者替换, 并不使相应技术方案的本质脱离本申请各实施例技 术方案的精神和范围。

Claims

权 利 要 求 书
1、 一种列式数据库处理方法, 其特征在于, 包括:
获取列式数据库的数据库操作语句, 并根据所述数据库操作语 句生成第一执行图;
将所述第一执行图中的算子进行分组, 生成至少一组分组信息, 其中每组分组信息对应一个分组;
根据所述至少一组分组信 , 修改所述第一执行图的执行过程, 生成第二执行图;
按照所述第二执行图处理所述列式数据库中的数据。
2、 根据权利要求 1所述的方法, 其特征在于, 所述将所述第一 执行图中的算子进行分组, 生成至少一组分组信息, 包括:
遍历所述第一执行图, 依次判断所述第一执行图中的每个算子 是否具备屏障特征;
若当前判断的算子具备屏障特征, 则结束当前分组, 生成所述 当前分组的分组信息, 并生成新的分组;
若所述当前判断的算子不具备屏障特征, 则将所述当前判断的 算子并入所述当前分组中;
其中, 所述屏障特征为包含用户预选的特定操作, 所述特定操 作为以下操作中的任意一个: 选择操作、 多表输入操作、 输出到多个 算子操作。
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述根据所 述至少一组分组信息修改所述第一执行图的执行过程, 生成第二执行 图包括:
根据所述至少一组分组信息中的各分组信息分别修改所述每个 分组信息对应的分组的执行过程;
将修改后的所述每个分组信息对应的分组的执行过程进行整 合, 生成所述第二执行图。
4、 根据权利要求 3所述的方法, 其特征在于, 所述分组信息包 括算子信息列表, 所述算子信息列表为所述分组内的各算子以及每个 算子对应的算子类型的关系表, 其中, 所述算子类型为顺序算子、 多 趟算子或一般算子, 所述一般算子是指除顺序算子、 多趟算子以外的 其他类型的算子。
5、 根据权利要求 4所述的方法, 其特征在于, 所述分组信息还 包括分组标识; 其中, 若所述分组标识为顺序标识则表明所述分组信 息对应分组中的算子均为顺序算子, 若所述分组标识为多趟标识则表 明所述分组信息对应分组中的算子包含多趟算子, 若所述分组信息不 包含分组标识则表明所述分组信息对应分组中的算子均为一般算子。
6、 根据权利要求 5所述的方法, 其特征在于, 所述根据所述至 少一组分组信息中的各分组信息分别修改所述每个分组信息对应的 分组的执行过程, 包括:
若第一分组信息中的分组标识为顺序标识, 则对所述列式数据 库的每列数据进行分段处理, 并通过所述第一分组信息对应的分组中 的每个算子按照分段后的每段数据的先后顺序依次进行处理;
或者,
若所述第一分组信息中的分组标识为多趟标识, 则调用合并算 子, 并将所述第一分组信息对应的分组的所有算子替换为所述合并算 子;
或者,
若所述第一分组信息中不包含分组标识, 则不修改所述第一分 组信息对应的分组的执行过程;
其中, 所述第一分组信息为所述至少一组分组信息中的一个分 组信息。
7、 根据权利要求 6所述的方法, 其特征在于, 所述若所述第一 分组信息中的分组标识为多趟标识, 则调用合并算子, 并将所述第一 分组信息对应的分组的所有算子替换为所述合并算子, 包括:
若所述第一分组信息中的分组标识为多趟标识, 则根据所述第 一分组的所有多趟算子从信息映射表中调用所述合并算子, 并利用所 述合并算子替换所述第一分组中的所有算子; 其中, 所述信息映射表 为多趟算子与合并算子的映射关系表。
8、 根据权利要求 6或 7所述的方法, 其特征在于, 若所述合并 算子为顺序算子, 则
所述调用合并算子, 并将所述第一分组信息对应的分组的所有 算子替换为所述合并算子之后, 还包括:
对所述列式数据库的每列数据进行分段处理, 并通过所述合并 算子按照分段后每段数据的先后顺序依次进行处理。
9、 根据权利要求 4所述的方法, 其特征在于, 所述根据所述至 少一组分组信息中的各分组信息分别修改所述每个分组信息对应的 分组的执行过程, 包括:
若所述第一分组信息中算子信息列表中的所有算子均为顺序算 子, 则对所述列式数据库的每列数据进行分段处理, 并通过所述第一 分组信息对应的分组中的每个算子按照分段后的每段数据的先后顺 序依次进行处理;
或者,
若所述第一分组信息中算子信息列表中的算子包含多趟算子, 则调用合并算子, 并将所述第一分组信息对应的分组的所有算子替换 为所述合并算子;
或者,
若所述第一分组信息中算子信息列表中的算子为一般算子, 则 不修改所述第一分组信息对应的分组的执行过程;
其中, 所述第一分组信息为所述至少一组分组信息中的一个分 组信息。
10、 一种列式数据库处理装置, 其特征在于, 包括:
生成模块, 用于获取所述列式数据库的数据库操作语句, 并根 据所述数据库操作语句生成第一执行图;
分组模块, 用于将所述生成模块生成的所述第一执行图中的算 子进行分组, 生成至少一组分组信息, 其中每组分组信息对应一个分 组; 处理模块, 用于根据所述分组模块生成的至少一组分组信息修 改所述第一执行图的执行过程, 生成第二执行图;
执行模块, 用于按照所述第二执行图处理所述列式数据库中的 数据。
1 1、 根据权利要求 10所述的装置, 其特征在于, 所述分组模块 具体用于: 遍历所述第一执行图, 依次判断所述生成模块生成的所述 第一执行图中的每个算子是否具备屏障特征; 若当前判断的算子具备 屏障特征, 则结束当前分组, 生成所述当前分组的分组信息, 并生成 新的分组; 若所述当前判断的算子不具备屏障特征, 则将所述当前判 断的算子并入所述当前分组中;
其中, 所述屏障特征为包含用户预选的特定操作, 所述特定操 作为以下操作中的任意一个: 选择操作、 多表输入操作、 输出到多个 算子操作。
12、 根据权利要求 10或 1 1 所述的装置, 其特征在于, 所述处 理模块包括:
处理单元, 用于根据所述分组模块生成的所述至少一组分组信 息中的各分组信息分别修改所述每个分组信息对应的分组的执行过 程;
整合单元, 用于将修改后的所述每个分组信息对应的分组的执 行过程进行整合, 生成所述第二执行图。
13、 根据权利要求 12所述的装置, 其特征在于, 所述分组信息 包括算子信息列表, 所述算子信息列表为所述分组内的各算子以及每 个算子对应的算子类型的关系表, 其中, 所述算子类型为顺序算子、 多趟算子或一般算子, 所述一般算子是指除顺序算子、 多趟算子以外 的其他类型的算子。
14、 根据权利要求 13所述的装置, 其特征在于, 所述分组信息 还包括分组标识; 其中, 若所述分组标识为顺序标识则表明所述分组 信息对应分组中的算子均为顺序算子, 若所述分组标识为多趟标识贝 'J 表明所述分组信息对应分组中的算子包含多趟算子, 若所述分组信息 不包含分组标识则表明所述分组信息对应分组中的算子均为一般算 子。
15、 根据权利要求 14所述的装置, 其特征在于, 所述处理单元 具体用于:
若第一分组信息中的分组标识为顺序标识, 则对所述列式数据 库的每列数据进行分段处理, 并通过所述第一分组信息对应的分组中 的每个算子按照分段后的每段数据的先后顺序依次进行处理;
或者,
若所述第一分组信息中的分组标识为多趟标识, 则调用合并算 子, 并将所述第一分组信息对应的分组的所有算子替换为所述合并算 子;
或者,
若所述第一分组信息中不包含分组标识, 则不修改所述第一分 组信息对应的分组的执行过程;
其中, 所述第一分组信息为所述至少一组分组信息中的一个分 组信息。
16、 根据权利要求 15所述的装置, 其特征在于, 所述若所述第 一分组信息中的分组标识为多趟标识或所述第一分组信息中算子信 息列表中的算子包含多趟算子, 则调用合并算子, 并将所述第一分组 信息对应的分组的所有算子替换为所述合并算子, 具体为:
若所述第一分组信息中的分组标识为多趟标识或所述第一分组 信息中算子信息列表中的算子包含多趟算子, 则根据所述第一分组的 所有多趟算子从信息映射表中调用所述合并算子, 并利用所述合并算 子替换所述第一分组中的所有算子; 其中, 所述信息映射表为多趟算 子与合并算子的映射关系表。
17、 根据权利要求 15或 16所述的装置, 其特征在于, 若所述 合并算子为顺序算子, 则
所述处理单元, 还用于在调用合并算子, 并将所述第一分组信 息对应的分组的所有算子替换为所述合并算子之后, 对所述列式数据 库的每列数据进行分段处理, 并通过所述合并算子按照分段后每段数 据的先后顺序依次进行处理。
18、 根据权利要求 13所述的装置, 其特征在于, 所述处理单元 具体用于:
若所述第一分组信息中算子信息列表中的所有算子均为顺序算 子, 则对所述列式数据库的每列数据进行分段处理, 并通过所述第一 分组信息对应的分组中的每个算子按照分段后的每段数据的先后顺 序依次进行处理;
或者,
若所述第一分组信息中算子信息列表中的算子包含多趟算子, 则调用合并算子, 并将所述第一分组信息对应的分组的所有算子替换 为所述合并算子;
或者,
若所述第一分组信息中算子信息列表中的算子为一般算子, 则 不修改所述第一分组信息对应的分组的执行过程;
其中, 所述第一分组信息为所述至少一组分组信息中的一个分 组信息。
19、 一种列式数据库处理装置, 其特征在于, 包括处理器和存储 器, 所述存储器存储执行指令, 当所述装置运行时, 所述处理器与所述存 储器之间通信,所述处理器执行所述执行指令使得所述装置执行如下方法: 获取列式数据库的数据库操作语句, 并根据所述数据库操作语 句生成第一执行图;
将所述第一执行图中的算子进行分组, 生成至少一组分组信息, 其中每组分组信息对应一个分组;
根据所述至少一组分组信 , 修改所述第一执行图的执行过程, 生成第二执行图;
按照所述第二执行图处理所述列式数据库中的数据。
20、 根据权利要求 19所述的装置, 其特征在于, 所述处理器执 行的方法中, 所述将所述第一执行图中的算子进行分组, 生成至少一 组分组信息, 包括: 遍历所述第一执行图, 依次判断所述第一执行图 中的每个算子是否具备屏障特征; 若当前判断的算子具备屏障特征, 则结束当前分组, 生成所述当前分组的分组信息, 并生成新的分组; 若所述当前判断的算子不具备屏障特征, 则将所述当前判断的算子并 入所述当前分组中;
其中, 所述屏障特征为包含用户预选的特定操作, 所述特定操 作为以下操作中的任意一个: 选择操作、 多表输入操作、 输出到多个 算子操作。
2 1、 根据权利要求 1 9或 20所述的装置, 其特征在于, 所述处 理器执行的所述方法中, 所述根据所述至少一组分组信息修改所述第 一执行图的执行过程, 生成第二执行图包括: 根据所述至少一组分组 信息中的各分组信息分别修改所述每个分组信息对应的分组的执行 过程; 将修改后的所述每个分组信息对应的分组的执行过程进行整 合, 生成所述第二执行图。
22、 根据权利要求 2 1所述的装置, 其特征在于, 所述分组信息 包括算子信息列表, 所述算子信息列表为所述分组内的各算子以及每 个算子对应的算子类型的关系表, 其中, 所述算子类型为顺序算子、 多趟算子或一般算子, 所述一般算子是指除顺序算子、 多趟算子以外 的其他类型的算子。
23、 根据权利要求 22所述的装置, 其特征在于, 所述分组信息 还包括分组标识; 其中, 若所述分组标识为顺序标识则表明所述分组 信息对应分组中的算子均为顺序算子, 若所述分组标识为多趟标识贝 'J 表明所述分组信息对应分组中的算子包含多趟算子, 若所述分组信息 不包含分组标识则表明所述分组信息对应分组中的算子均为一般算 子。
24、 根据权利要求 23所述的装置, 其特征在于, 所述处理器执 行的所述方法中, 所述根据所述至少一组分组信息中的各分组信息分 另 'J修改所述每个分组信息对应的分组的执行过程, 包括:
若第一分组信息中的分组标识为顺序标识, 则对所述列式数据 库的每列数据进行分段处理, 并通过所述第一分组信息对应的分组中 的每个算子按照分段后的每段数据的先后顺序依次进行处理;
或者,
若所述第一分组信息中的分组标识为多趟标识, 则调用合并算 子, 并将所述第一分组信息对应的分组的所有算子替换为所述合并算 子;
或者,
若所述第一分组信息中不包含分组标识, 则不修改所述第一分 组信息对应的分组的执行过程;
其中, 所述第一分组信息为所述至少一组分组信息中的一个分 组信息。
25、 根据权利要求 24所述的装置, 其特征在于, 所述处理器执 行的所述方法中, 所述若所述第一分组信息中的分组标识为多趟标 识, 则调用合并算子, 并将所述第一分组信息对应的分组的所有算子 替换为所述合并算子, 包括: 若所述第一分组信息中的分组标识为多 趟标识, 则根据所述第一分组的所有多趟算子从信息映射表中调用所 述合并算子, 并利用所述合并算子替换所述第一分组中的所有算子; 其中, 所述信息映射表为多趟算子与合并算子的映射关系表。
26、 根据权利要求 24或 25 所述的装置, 其特征在于, 若所述 合并算子为顺序算子, 则
所述处理器执行的所述方法中, 所述调用合并算子, 并将所述 第一分组信息对应的分组的所有算子替换为所述合并算子之后, 还包 括: 对所述列式数据库的每列数据进行分段处理, 并通过所述合并算 子按照分段后每段数据的先后顺序依次进行处理。
27、 根据权利要求 22所述的装置, 其特征在于, 所述处理器执 行的所述方法中, 所述根据所述至少一组分组信息中的各分组信息分 别修改所述每个分组信息对应的分组的执行过程, 包括:
若所述第一分组信息中算子信息列表中的所有算子均为顺序算 子, 则对所述列式数据库的每列数据进行分段处理, 并通过所述第一 分组信息对应的分组中的每个算子按照分段后的每段数据的先后顺 序依次进行处理;
或者,
若所述第一分组信息中算子信息列表中的算子包含多趟算子, 则调用合并算子, 并将所述第一分组信息对应的分组的所有算子替换 为所述合并算子;
或者,
若所述第一分组信息中算子信息列表中的算子为一般算子, 则 不修改所述第一分组信息对应的分组的执行过程;
其中, 所述第一分组信息为所述至少一组分组信息中的一个分 组信息。
PCT/CN2013/086341 2013-10-31 2013-10-31 一种列式数据库处理方法及装置 WO2015062035A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP13896495.2A EP3057001A4 (en) 2013-10-31 2013-10-31 METHOD AND DEVICE FOR COLUMN DATABASE PROCESSING
PCT/CN2013/086341 WO2015062035A1 (zh) 2013-10-31 2013-10-31 一种列式数据库处理方法及装置
CN201380001389.5A CN105264519B (zh) 2013-10-31 2013-10-31 一种列式数据库处理方法及装置
US15/143,132 US20160246825A1 (en) 2013-10-31 2016-04-29 Columnar database processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/086341 WO2015062035A1 (zh) 2013-10-31 2013-10-31 一种列式数据库处理方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/143,132 Continuation US20160246825A1 (en) 2013-10-31 2016-04-29 Columnar database processing method and apparatus

Publications (1)

Publication Number Publication Date
WO2015062035A1 true WO2015062035A1 (zh) 2015-05-07

Family

ID=53003156

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/086341 WO2015062035A1 (zh) 2013-10-31 2013-10-31 一种列式数据库处理方法及装置

Country Status (4)

Country Link
US (1) US20160246825A1 (zh)
EP (1) EP3057001A4 (zh)
CN (1) CN105264519B (zh)
WO (1) WO2015062035A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10191944B2 (en) * 2015-10-23 2019-01-29 Oracle International Corporation Columnar data arrangement for semi-structured data
CN107273430B (zh) * 2017-05-16 2021-05-18 北京奇虎科技有限公司 一种数据存储方法和装置
CN108389027B (zh) * 2017-12-30 2020-06-16 北京航天智造科技发展有限公司 一种面向工业的app应用开发系统

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102609493A (zh) * 2012-01-20 2012-07-25 东华大学 一种基于列存储模型的连接顺序查询优化方法
US20130132371A1 (en) * 2011-11-23 2013-05-23 Infosys Technologies Limited Methods, systems, and computer-readable media for providing a query layer for cloud databases
CN103324765A (zh) * 2013-07-19 2013-09-25 西安电子科技大学 一种基于列存储的多核并行数据查询优化方法

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080065590A1 (en) * 2006-09-07 2008-03-13 Microsoft Corporation Lightweight query processing over in-memory data structures
US8478775B2 (en) * 2008-10-05 2013-07-02 Microsoft Corporation Efficient large-scale filtering and/or sorting for querying of column based data encoded structures
US8954418B2 (en) * 2010-05-14 2015-02-10 Sap Se Performing complex operations in a database using a semantic layer
US8631000B2 (en) * 2010-09-30 2014-01-14 International Business Machines Corporation Scan sharing for query predicate evaluations in column-based in-memory database systems

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130132371A1 (en) * 2011-11-23 2013-05-23 Infosys Technologies Limited Methods, systems, and computer-readable media for providing a query layer for cloud databases
CN102609493A (zh) * 2012-01-20 2012-07-25 东华大学 一种基于列存储模型的连接顺序查询优化方法
CN103324765A (zh) * 2013-07-19 2013-09-25 西安电子科技大学 一种基于列存储的多核并行数据查询优化方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LU , XUCHEN ET AL.: "Multi-query Optimization Strategy of OLAP in Column Storage", JOURNAL OF FRONTIERS OF COMPUTER SCIENCE & TECHNOLOGY, 30 September 2012 (2012-09-30), XP008181500 *

Also Published As

Publication number Publication date
EP3057001A4 (en) 2016-11-16
CN105264519B (zh) 2019-01-25
CN105264519A (zh) 2016-01-20
EP3057001A1 (en) 2016-08-17
US20160246825A1 (en) 2016-08-25

Similar Documents

Publication Publication Date Title
JP6726246B2 (ja) 畳み込みニューラルネットワークにおいて演算を実行する方法および装置並びに非一時的な記憶媒体
US10769147B2 (en) Batch data query method and apparatus
CN109815283B (zh) 一种异构数据源可视化查询方法
JP6400010B2 (ja) 集約/グループ化動作:フィルタリング方法のハードウェア実装
JP5950285B2 (ja) 予め決められた複数のビット幅のデータに対して操作を行う命令を使用してツリーの検索を行うための方法、並びに、当該命令を使用してツリーの検索を行うためのコンピュータ及びそのコンピュータ・プログラム
JP6305406B2 (ja) フィルタリング/射影動作のハードウェア実装
JP7461344B2 (ja) 畳み込みニューラルネットワークの畳み込み処理方法、装置及び記憶媒体
WO2022057303A1 (zh) 一种图处理的方法,系统以及装置
CN113641701A (zh) 一种数据查询方法、系统、异构加速平台及存储介质
US20230259509A1 (en) Data association query method and apparatus, device, and storage medium
PT105174A (pt) Instrumento e método para processamento contínuo de dados usando processadores massivamente paralelos
US11132363B2 (en) Distributed computing framework and distributed computing method
WO2020253117A1 (zh) 一种数据处理方法及装置
WO2015062035A1 (zh) 一种列式数据库处理方法及装置
CN114328612A (zh) 查询优化器的数据处理方法、装置及电子设备
WO2021004266A1 (zh) 数据插入方法、装置、设备和储存介质
US20230214389A1 (en) Pruner selector
CN111125216A (zh) 数据导入Phoenix的方法及装置
CN109918074B (zh) 编译链接优化方法
US20130173647A1 (en) String matching device based on multi-core processor and string matching method thereof
JP6453685B2 (ja) 演算制御装置、演算制御方法及び演算制御プログラム
WO2024067303A1 (zh) 仿真方法、电子设备、计算机可读介质
JP7138313B1 (ja) コンピュテーショナル・ストレージの処理効率化の方法およびプログラム
CN113918595A (zh) 数据查询方法及装置
JP2016130929A (ja) 集約装置、集約システム、集約方法、および、プログラム

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201380001389.5

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 13896495

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2013896495

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2013896495

Country of ref document: EP