Method of optimizing data processing, information processing apparatus and program

By replacing JOIN-PROJECT operations with ISIN FILTER-PROJECT when conditions are met, the method reduces computational costs in data processing, achieving substantial speed improvements in data analysis tasks.

WO2024218942A1PCT designated stage expired Publication Date: 2024-10-24NEC CORP
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2023/015787
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-04-20
Publication Date
2024-10-24

AI Technical Summary

Technical Problem

The computational cost of conventional JOIN operations in data processing is high, especially when joining and projecting data from multiple tables, and existing optimizations like HASH-JOIN are limited to specific conditions and increase with input table size.

Method used

A method that determines if the JOIN-PROJECT operation satisfies specific conditions, such as unique common keys in the second table and all project target columns being in the first table, and replaces it with an ISIN FILTER-PROJECT operation, which reduces computational cost by using if-checks to identify and project target values.

Benefits of technology

This approach significantly reduces computation cost by up to 9 times, with an average speed-up of 3.5 times compared to conventional JOIN-PROJECT operations, making data processing more efficient.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2023015787_24102024_PF_FP_ABST
    Figure JP2023015787_24102024_PF_FP_ABST
Patent Text Reader

Abstract

There is provided a method for optimizing data processing including a first operation which includes joining first and second tables each having common key, to generate a merged table, and projects value of project target column(s) of records in the merged table, the method comprising: replacing the first operation with a second operation, if the first operation satisfies first and second conditions, wherein, the first condition is that values of common key in the second table is unique, the second condition is that all the project target columns are included in the first table, and the second operation comprises; identifying a value(s) of common key of record(s) in the second table; and projecting value(s) of the column(s) of record(s) having the target value(s) in the common key column of the first table.
Need to check novelty before this filing date? Find Prior Art

Description

METHOD OF OPTIMIZING DATA PROCESSING, INFORMATION PROCESSING APPARATUS AND PROGRAM

[0001] The present invention relates to a method of optimizing data processing, an information processing apparatus, and a program.

[0002] In relational database, data of different entities are stored across different tables in order to normalize data (to optimize memory for data storage, avoid anomalies in data-handling etc.). Some Queries may use records stored across different tables to perform useful analysis. “JOIN” function (hereinafter simply expresses as JOIN) is used in such cases.

[0003] JOIN is a very frequently used operation in relational data analysis, training data preparation for Machine Learning algorithms by combining different input files etc. JOIN can be of different types. For example, SQL, one of the languages for controlling databases, has functions such as INNER - JOIN, OUTER - JOIN, etc. In the INNER - JOIN, only keys found in both tables (i.e., common keys) will be considered for joining.

[0004] For example, in a relational database with a first table and a second table, there is a data processing that outputs (projects) values of target columns of records in the first table, where, in the records, the values of specific columns included only in the second table satisfy predetermined filtering conditions. When performing such a data processing, the first table and the second table are first merged with an INNER-JOIN to generate a merged table. From the merged table, records are extracted (filtered) whose values in the specific column satisfy the filtering conditions. Then, the values of the target columns of the filtered records are projected.

[0005] However, the computation cost of conventional JOIN operation is high. To reduce the computational cost, algorithms such as HASH-JOIN has been proposed, for example, which do not require process of sorting each table in advance (refer to Non-Patent Literature 1).

[0006] [NPLT 1] Zhou, J. (2009). Hash Join. In: LIU, L., OEZSU, M.T. (eds) “Encyclopedia of Database Systems”. Springer, Boston, MA, [online] [searched on February 16, 2023], Internet <URL: https: / / doi.org / 10.1007 / 978-0-387-39940-9_869>

[0007] The following analysis is made by the inventor of the present invention.

[0008] Among JOIN operations, HASH-JOIN with relatively low computational cost is restricted to cases where equivalence conditions are specified in the join condition. Even for HASH-JOIN, computational cost of join operation increases with the growth of the input table sizes.

[0009] In data analysis, after performing JOIN operation on two or more tables, the required columns are often extracted (projected) to perform useful analysis. In other words, JOIN and PROJECT are often used as a set, in data analysis.

[0010] Therefore, it is desirable to reduce computation cost of operation corresponding to JOIN-PROJECT, which joins two or more tables and extracts (or project) the required data.

[0011] In view of the foregoing, the present invention has been made. It is an object of the present invention to provide a technique that contributes to reducing computation cost in data processing (data analysis), in which two or more tables are joined and required data are extracted (or projected).

[0012] According to a first aspect of the present invention, there is provided a method for optimizing data processing including a first operation, the first operation including joining a first table and a second table, each having a common key, to generate a merged table, and projecting a value of one or more project target column(s) of records in the merged table, the method comprising: - determining by a computer whether content of the first operation satisfies a first condition and a second condition; and - replacing the first operation with a second operation, if the content of the first operation satisfies the first condition and the second condition, wherein, - the first condition is that each value of the common key in the second table is unique, - the second condition is that all of the project target columns are included in the first table, and - the second operation comprises; -- identifying a value(s) of the common key of record(s) in the second table, as a target value(s); and -- projecting value(s) of the project target column(s) of a record(s) having the target value(s) in the common key column of the first table.

[0013] According to a second aspect of the present invention, there is provided an information processing apparatus, comprising: - a query analysis part that analyzes queries to be processed and determines whether or not a first operation is included in the queries to be processed; - a query optimization part that performs a query optimization process; and a query execution part that executes the queries to be processed after optimization by the query optimization part, wherein - the first operation comprises joining a first table and a second table, each having a common key, to generate a merged table, and projects a value of one or more project target column(s) of records in the merged table, - the query optimization process comprises determining whether content of the first operation satisfies a first condition and a second condition, if the query analysis part determines that the queries to be processed include the first operation, and replacing the first operation in the queries to be processed with a second operation, if the content of the first operation satisfies the first condition and the second condition, - the first condition is that each value of the common key in the second table is unique, - the second condition is that all of the project target columns are included in the first table, and - the second operation comprises; -- identifying a value(s) of the common key of record(s) in the second table, as a target value(s); and -- projecting value(s) of the project target column(s) of a record(s) having the target value(s) in the common key column of the first table.

[0014] According to a third aspect of the present invention, there is provided a program causing a computer performing optimizing data processing including a first operation, the first operation including joining a first table and a second table, each having a common key, to generate a merged table, and projecting a value of one or more project target column(s) of records in the merged table, to execute steps of: - determining whether content of the first operation satisfies a first condition and a second condition; and - replacing the first operation with a second operation, if the content of the first operation satisfies the first condition and the second condition, wherein, - the first condition is that each value of the common key in the second table is unique, - the second condition is that all of the project target columns are included in the first table, - the second operation comprises; -- identifying a value(s) of the common key of record(s) in the second table, as a target value(s); and -- projecting value(s) of the project target column(s) of a record(s) having the target value(s) in the common key column of the first table.

[0015] The above program may be stored in a computer-readable storage medium. The storage medium may be non-transient one such as a semiconductor memory, a hard disk, a magnetic recording medium, an optical recording medium, and the like. The present invention can be realized as a computer program product.

[0016] According to the present invention, it is possible to contribute to reducing computation cost in data processing, in which two or more tables are joined and required data are extracted (or projected).

[0017] Fig. 1(a) and Fig. 1(b) are diagrams illustrating examples of tables and a problem statement according to an example embodiment of the present invention.Fig. 2(a) to Fig. 2(c) are diagrams illustrating an operation of a conventional data processing.Fig. 3(a) to Fig. 3(c) are diagrams illustrating an operation of data processing according to the example embodiment of the present invention.Fig. 4(a) and Fig. 4(b) are diagrams illustrating conditions for which the optimization process cannot be performed according to the example embodiment of the present invention.Fig. 5(a) and Fig. 5(b) are a functional block diagram and a hardware configuration diagram of an information processing apparatus according to the example embodiment of the present invention.Fig. 6 is a flowchart illustrating an example of a data analysis process according to the example embodiment of the present invention.Fig. 7 is a flowchart illustrating an example of a query optimization process according to the example embodiment of the present invention.Fig. 8 is a flowchart illustrating an example of an ISIN FILTER-PROJECT operation according to the example embodiment of the present invention.Fig. 9(a) and Fig. 9(b) are diagrams illustrating an evaluation result.

[0018] First, an outline of an example embodiment of the present invention will be described with reference to drawings. In the following outline, various components are denoted by reference characters for the sake of convenience. That is, the following reference characters are merely used as examples to facilitate understanding of the present invention. Thus, the description of the outline is not meant to limit the present invention to the illustrated modes. An individual connection line between blocks in the drawings, etc. referred to in the following description signifies both one-way and two-way directions. An arrow schematically illustrates a principal signal (data) flow and does not exclude bidirectionality.

[0019] While a port or an interface is present at an input / output connection point of an individual block in the relevant drawings, illustration of the port or the interface is omitted. In addition, in the following description, “A and / or B” signifies A or B or A and B.

[0020] In the present example embodiment, an example will be described in which queries to be optimized, i.e., the queries for which the computational cost is to be reduced, is a JOIN-PROJECT in, for example, SQL language. In data analysis (data processing) according to the present example embodiment, JOIN-PROJECT operation in queries of data analysis program is replaced for optimization with an operation using ISIN method, if contents in the JOIN-PROJECT operation satisfy prescribed conditions. The operation with which the JOIN-PROJECT operation is to be replaced is hereinafter referred to as ISIN FILTER-PROJECT operation. Hereinafter, JOIN-PROJECT operation is simply referred to as JOIN-PROJECT and ISIN FILTER-PROJECT operation is simply referred to as ISIN FILTER-PROJECT.

[0021] The target tables for the data analysis shall be included in a relational database (RDB). That is, each table has a common key to make a relationship. Hereinafter, the rows of the tables are called records and the fields of the tables are called columns.

[0022] First, JOIN-PROJECT is explained with an example using the relational database (RDB) 900 shown in Fig. 1(a). JOIN-PROJECT simply means joining two tables using a common key and project (extract) target column. That is to say JOIN-PROJECT is an operation that, for example, joins the first table (LEFT table) and the second table (RIGHT table) based on a common key to generate a joined table (merged table), and outputs (projects) the values of the specified columns (project target columns) of the joined table.

[0023] The JOIN-PROJECT will be described with a concrete example.

[0024] As illustrated in Fig. 1(a), a relational database (RDB) 900 according to the present example embodiment is provided with a first table and a second table. The first table is a student table 100 which stores attributes and marks data of students from various countries of origin. The second table is a country table 200. The common key for both tables is a country code, which is described below.

[0025] The student table 100 is provided with columns of a student identification information (S_id)101, a student name (S_name)102, a mark (S_marks)103 and a country code (C_id)104, and is a table that stores a name, marks and a country code of origin of each student.

[0026] The country table 200 is provided with columns of a country code (C_id) 201 and country name (C_name) 202, and is a table that stores a name of a country corresponding to the country code.

[0027] In a system with such an RDB 900, for example, as illustrated in Fig. 1(b), it supposes that a problem statement of “Get names and marks for students from INDIA or JAPAN” is given. This problem statement means that projecting values of the student name (S_name)102 and the marks (S_marks)103 of the records of the student (S_id)101, whose country name (C_name) 202 is INDIA or JAPAN. A filtering condition should be "in records which have columns of the student name (S_name)102, the marks (S_marks)103 and the country name (C_name) 202, a value of the country name (C_name) 202 matching INDIA or JAPAN".

[0028] Following queries are created for the above problem statement, when using JOIN-PROJECT (conventional queries), as shown in Fig. 1(b) (CONVENTIONAL QUERIES). - dc1: filter records from the country table 200 where a value of the country name (C_name) 202 is INDIA or JAPAN (dc1= FILTER Country where C_name =INDIA or C_name = JAPAN). An example of a filtered country table 210 generated by this query is illustrated in Fig. 2(a). - dc2: join the student table 100 and the filtered country table 210 using the common key (country code (C_id) 104 or 201) to create merged table 300 (dc2= INNER-JOIN (Student, dc1, on=C_id)). An example of the merged table 300 generated by this query is illustrated in Fig. 2(b). - dc3: project values of the student name (S_name)102 and marks (S_marks)103 for each record in the merged table 300 (dc3= PROJECT [S_name, S_marks] from dc2). An example of a projected result 301 is illustrated in Fig. 2(c).

[0029] In the present example embodiment, when such a problem statement is given, the JOIN-PROJECT (queries of dc2 and dc3 above) is replaced by the ISIN FILTER-PROJECT to optimize processes, if prescribed conditions are satisfied.

[0030] ISIN is a method that checks whether or not each record in a table has a particular value of a given list and returns a bool type (True or False) for each record. In other words, ISIN is a method that returns True for records having the particular value and False for all other records.

[0031] In the present example embodiment, when the above-mentioned problem statement of "Get names and marks for students from INDIA or JAPAN" is given, if the prescribed conditions are satisfied, following queries are created, as illustrated in Fig. 1(b) (OPTIMIZED QUERIES). - do1: filter records from the country table 200 where a value of the country name (C_name) 202 is INDIA or JAPAN. (do1=FILTER Country where C_name =INDIA or C_name = JAPAN). The filtered country table generated by this query is similar to the filtered country table 210 illustrated in Fig. 2(a). - do2: check each record of student table 100 to evaluate whether it has any of values (C_03 and C_04) included in the filtered country table 210 (True / False determination) and filter (extract) records where determination result is true. (do2=FILTER (Student) where Student.C_id ISIN (do1.C_id)). An example of the determination result 110 and an example of a filtered result 111 are shown in Fig. 3(a) and Fig. 3(b), respectively. The determination result 110 is a result of returning True if the value of the Student.C_id (104) is C_03 or C_04, and False otherwise, since the filtered country table 210 has only C_03 and C_04 as values for the country code (C_id) 201. - do3: project values of the student name (S_name)102 and marks (S_marks)103 for each record in the filtered result 111. (do3=PROJECT [S_name, S_marks] from do2). An example of a projected result 112 is illustrated in Fig. 3(c). Note that, the projected result 112 illustrated in Fig. 3(c) is the same as the projected result 301 obtained by JOIN-PROJECT illustrated in Fig. 2(c).

[0032] In optimizing JOIN-PROJECT, a table and a filtering condition should satisfy certain conditions, as described above. The certain conditions are a first condition and a second condition.

[0033] The first condition is that values of the key column is unique in the second table. That is, in the example above, there are no duplicate values for the common key (country code (C_id) 201), in the filtered country table 210.

[0034] For example, the country table 200 illustrated in Fig. 1(a) satisfies the first condition. On the other hand, a country table 200a illustrated in Fig. 4(a), for example, does not satisfy the first condition. In the country table 200a, the same value is assigned to the country code (C_id)201 for each region. As illustrated in Fig. 4(a), in the country table 200a, C_01 is assigned to CANADA and USA, and C_04 to JAPAN and KOREA. In this case, the values of the common key (country code (C_id) 201), do not correspond one-to-one to the values of the country name (C_name) 202, so the True / False determination cannot be made on the values of the common key. If C_04 is determined to be True, not only the record of the student from JAPAN, but also the record of the student from KOREA is determined to be True.

[0035] The second condition is that all project target columns are included in the first table. The project target columns in the second condition are columns other than the common key (non-key column). In the example query created from the above problem statement, the project target columns are the student name (S_name) 102 and the marks (S_marks) 103, and both of which are included in student table 100.

[0036] On the other hand, for example, if the problem statement is “Get names and marks with country name for students from INDIA and JAPAN”, the project target columns are student name (S_name) 102, the marks (S_marks) 103 and the country name (C_name) 202. Therefore, in this case, the second condition is not satisfied. In the ISIN FLITER-PROJECT, only the first table (the student table 100 in the above example) is used to determine true or false, and the second table (the filtered country table 210) itself is not used in the determination process. As illustrated in Fig. 4(b), the determination result 110 (and the filtered result 111) does not include information (values) for columns in the second table (the filtered country table 210), therefore. information from the other table cannot be projected.

[0037] An information processing apparatus 500 of the present example embodiment, which realizes the data analysis (data processing) described above, will be described.

[0038] <Functional Configuration> Fig. 5(a) is a block diagram for illustrating an example of a functional configuration of the information processing apparatus 500 according to the present example embodiment. Referring to Fig. 5(a), the information processing apparatus 500 according to the present example embodiment is provided with a query analysis part 510, a query optimization part 520, a query execution part 530, and a RDB (Relational DataBase) storage part 540.

[0039] The RDB storage part 540 stores each table included in the RDB 900.

[0040] The query analysis part 510 loads tables required for processing from the tables stored in the RDB storage part 540 into the work area and analyzes coded program of the problem statement (queries generated from the problem statement) to determine whether it includes the JOIN-PROJECT. The query analysis part 510 notifies the query optimization part 520 of the determination result.

[0041] The query optimization part 520 performs a query optimization process.

[0042] If the query optimization part 520 receives a determination result that the JOIN-PROJECT is included in the queries, it analyzes a content of the process in the JOIN-PROJECT and determines whether it can be replaced by the ISIN FILTER-PROJECT. Here, the query optimization part 520 determines whether the content of the process in the JOIN-PROJECT satisfies the first and second conditions above. If the query optimization part 520 determines that the content of the process in the JOIN-PROJECT satisfies both the first and second conditions, i.e., values of the common key of all records in the second table (the filtered country table 210), are unique and all project target columns are included in the first table, it decides that a replacement is possible.

[0043] The query optimization part 520 then replaces the JOIN-PROJECT in the queries with the ISIN FILTER -PROJECT, if it determines that they can be replaced. If the query optimization part 520 does not decide that replacement is possible, or if it receives a determination result from the query analysis part 510 that JOIN-PROJECT is not included, no replacement is performed.

[0044] The query execution part 530 executes the queries after the query optimization and project the results.

[0045] <Data analysis process> The flow of the data analysis process by the information processing apparatus 500 according to the present example embodiment is described. Fig. 6 is a flowchart illustrating an example of a data analysis process performed by the information processing apparatus 500 according to the present example embodiment. Here, it is assumed that the queries (program codes) have been generated beforehand from the given problem statement and the required databases have been loaded.

[0046] The query analysis part 510 analyzes the queries (step S1101). Here, the query analysis part 510 determines whether or not the JOIN-PROJECT is included in the queries and notifies the query optimization part 520 of the determination result.

[0047] The query optimization part 520 performs query optimization process (step S1102). Details of the query optimization process are described below.

[0048] Then, the query execution part 530 executes the queries (step S1103), projected the result (step S1104), and terminates the process.

[0049] <Query optimization process> The flow of the query optimization process by the query optimization part 520, when it receives a determination result from the query analysis part 510 that a JOIN-PROJECT is included in the queries, is described in Fig. 7. The queries to be optimized is the JOIN-PROJECT, described in Fig. 1(b) as CONVENTIONAL QUERIES. The first and second tables are the student table 100 and the filtered country table 210 illustrated in Fig. 1(a) and Fig. 2(a), respectively.

[0050] The query optimization part 520 first determines whether the JOIN-PROJECT detected by the query analysis part 510 satisfies the first condition.

[0051] The query optimization part 520 identifies a common key for the detected JOIN-PROJECT (step S1201). Here, the query optimization part 520 refers to and identifies the description of the common key of the INNER-JOIN query. That is, C_id in "dc2= INNER-JOIN (Student, dc1, on=C_id)".

[0052] The query optimization part 520 then determines whether each value of the common key is unique in the second table (filtered country table 210) (step S1202).

[0053] Next, if each value of the common key is unique (S1202; Yes), the query optimization part 520 determines whether the detected JOIN-PROJECT satisfies the second condition.

[0054] The query optimization part 520 identifies the project target column of the detected JOIN-PROJECT (step S1203). Here, the query optimization part 520 refers to and identifies the description of the project target column of the PROJECT query. That is, S_name and S_marks in "dc3= PROJECT [S_name, S_marks] from dc2".

[0055] The query optimization part 520 then determines whether all the project target columns are included in the first table (step S1204).

[0056] If all the project target columns are included in the first table (S1204; Yes), the query optimization part 520 replaces JOIN-PROJECT with ISIN FILTER-PROJECT in the queries (step S1205) and terminates the optimization process. If, in step S1202, each value of the common key of the second table is not unique (S1202; No), or if, in step S1204, all the project target columns are not included in the first table (S1204; No), the query optimization part 520 does not replace JOIN-PROJECT and terminates the optimization process. The process of step S1204 is performed when the number of project target columns is 2 or more. If the number of project target columns is 1, step S1204 is not performed, and the process moves to step S1205.

[0057] <ISIN FILTER-PROJECT operation> A flow of ISIN FILTER-PROJECT operation performed by the query execution part 530 is described briefly. Fig. 8 is a flowchart illustrating an example of ISIN FILTER-PROJECT operation. The following is the flow of the process when executing the queries below, created for the problem statement of "Get names and marks for students from INDIA and JAPAN". - do1= FILTER Country where C_name =INDIA or C_name = JAPAN - do2= FILTER (Student) where Student.C_id ISIN (do1.C_id) - do3= PROJECT [S_name, S_marks] from do2

[0058] The query execution part 530 filters records satisfying the filtering condition from the country table 200 to generate the filtered country table 210 illustrated in Fig. 2(a). That is, the query execution part 530 filters records where a value of the country name (C_name) 202 is INDIA or JAPAN (step S1301).

[0059] Then, the query execution part 530 extracts values of the common key (C_id), as a target value(s), from the filtered country table 210 (step S1302).

[0060] The query execution part 530 checks each record of the student table 100 to evaluate whether it has (any of) the target value(s) in Student.C_id column 104 (step S1303). Here, if the record has the target value(s), the query execution part 530 marks it as True, otherwise, the query execution part 530 marks it as False, and the determination result 110 illustrated in Fig. 3(a) is obtained.

[0061] The query execution part 530 then filters the records marked as True (step S1304) and obtains the filtered result 111 illustrated in Fig. 3(b).

[0062] The query execution part 530 projects values of the project target column from the filtered result 111 (step S1305), obtains the projected result 112 illustrated in Fig. 3 (c), and terminates process.

[0063] <Hardware Configuration> The information processing apparatus 500 of the present example embodiment is realized by a so-called general-purpose information processing apparatus (computer) and, for example, has a configuration as exemplified in Fig. 5 (b).

[0064] The information processing apparatus 500 of the present example embodiment is, for example, provided with a CPU (Central Processing Unit) 591, a main storage device (memory) 592, an auxiliary storage device 593, a communication I / F (interface) 594, and an extension I / F 595 which are interconnected by an internal bus as illustrated in Fig. 5(b).

[0065] The CPU 591, for example, loads the program stored in the auxiliary storage device 593 into the main storage device 592 and executes it to realize each of the above functions and to control the entire information processing apparatus 500. One or more processors such as a micro processing unit (MPU) may be used instead of the CPU 591.

[0066] The main storage device 592 is a memory such as RAM (Random Access Memory). The main storage device 592 is a work area for the CPU 591 to process the programs, etc. executed by the information processing apparatus 500.

[0067] The auxiliary storage device 593 stores various programs executed by the information processing apparatus 500. In the present example embodiment, the auxiliary storage device 593 also stores each table (student table 100 and country table 200) that are included in the RDB 900.

[0068] The above functions of the information processing apparatus 500 in the present example embodiment are realized by the CPU 591 loading and executing the program stored in the auxiliary storage device 593 into the main storage device 592. Data generated during processing is stored in the main storage device 592 or the auxiliary storage device 593.

[0069] The auxiliary storage device 593 has, for example, a ROM (Read Only Memory), HDD (Hard Disk Drive), SSD (Solid State Drive), etc. Auxiliary storage device 593 may have a storage medium such as a flexible disk, hard disk, optical disk, CD-ROM, CD-R, magnetic tape, non-volatile memory card, DVD, etc.

[0070] The program stored in the auxiliary storage device 593 can be provided as a program product recorded on a non-transitory computer-readable storage medium. The auxiliary storage device 593 can be used to store various programs recorded in the non-transitory computer readable storage medium in mid and long term.

[0071] The communication I / F 594 transmits and receives signals and data by wired or wireless means. The information processing apparatus 500 may be provided with, for example, a NIC (Network Interface Card) as the communication I / F 594.

[0072] The extension I / F 595 is an interface that connects an output device such as a display device and an input device. The display device is, for example, an LCD monitor. The input device is a device that accepts user operations, such as a keyboard or mouse, for example. In the present example embodiment, for example, inputted queries are accepted via the input device, and processing results are displayed on the display device.

[0073] It should be noted that the hardware configuration illustrated in Fig. 5(b) is not intended to limit the hardware configuration of the information processing apparatus 500. The information processing apparatus 500 may include a hardware(s) not illustrated in Fig. 5(b).

[0074] It is to be noted that programs which realize each function of the information processing apparatus 500 can be recorded on a computer-readable storage medium. The storage medium can be non-transient one, such as a semiconductor memory, a hard disk, a magnetic recording medium, an optical recording medium, and so on. The present invention can be implemented as a computer program product.

[0075] As explained above, the present example embodiment of the information processing apparatus 500 replaces the commonly used JOIN-PROJECT, as a process for joining two tables and filtering (extracting) necessary data, with ISIN FILTER-PROJECT whose computation cost is lower than JOIN-PROJECT, if the prescribed conditions are satisfied. The replacement is made if contents of JOIN-PROJECT satisfy the first and second conditions. The first condition is that each value of the common key in the second table is unique. The second condition is that all project target columns are columns of the first table.

[0076] As described above, ISIN simply involves some if-checks against the target values for each record of the first table. Thus, it is very lighter in comparison to HASH-JOIN operation. Hence ISIN FILTER-PROJECT will be much faster than JOIN-PROJECT. According to the present example embodiment, it is possible to contribute to reducing computation cost in data processing, in which two or more tables are joined and required data are projected.

[0077] <Modified example 1> In the above example embodiment and modified examples, each table is stored in the information processing apparatus 500, but is not limited to this. For example, each table may be stored in a network storage, such as NAS (Network Attached Storage) or SAN (Storage Area Network). Each table may be stored in different storages.

[0078] <Modified example 2> In the above embodiment and modified examples, each table is described as being included in the RDB, but is not limited to this.

[0079] Although, in a plurality of flowcharts used in the above description, a plurality of processes is described in sequence, an execution order of processes performed in each example embodiment and modified examples is not limited by an order of description thereof. In each example embodiment and modified examples, it is possible to change an order of processes illustrated in the drawings within an extent that will not offer any problem to content, for example, executing each processing in parallel and so on.

[0080] <Experimental study> Evaluation result of JOIN-PROJECT and ISIN FILTER-PROJECT is presented in Fig. 9(a) and Fig. 9(b). For the evaluation, we have used lineitem (size: 59986052.), supplier (size: 100000) and nation (size: 25) tables from the TPC-H benchmark with Scale Factor 10. TPC-H is a decision support benchmark, which consists of a suite of business-oriented ad hoc queries with concurrent data modifications. As illustrated in Fig. 9(a) and Fig. 9(b), ISIN FILTER-PROJECT is up to 9-times faster than JOIN-PROJECT, with an average speed-up of around 3.5 times.

[0081] A part or a whole of the above-mentioned example embodiments may be described as, but not limited to, the following supplementary notes. <Supplementary Note 1> - A method for optimizing data processing including a first operation, the first operation including joining a first table and a second table, each having a common key, to generate a merged table, and projecting a value of one or more project target column(s) of records in the merged table, the method comprising: - determining by a computer whether content of the first operation satisfies a first condition and a second condition; and - replacing the first operation with a second operation, if the content of the first operation satisfies the first condition and the second condition, wherein, - the first condition is that each value of the common key in the second table is unique, - the second condition is that all of the project target columns are included in the first table, and - the second operation comprises; -- identifying a value(s) of the common key of record(s) in the second table, as a target value(s); and -- projecting value(s) of the project target column(s) of a record(s) having the target value(s) in the common key column of the first table. <Supplementary Note 2> - The method for optimizing data processing according to the Supplementary Note 1, wherein, - in the second operation, the value(s) of the project target column(s) of the record(s) in the first table, for which a value of the common key is the target value, is projected. <Supplementary Note 3> - The method for optimizing data processing according to the Supplementary Note 1 or 2, wherein, - the computer performs the first operation, if at least one of the first condition and the second condition is not satisfied. <Supplementary Note 4> - The method for optimizing data processing according to any one of Supplementary Notes 1 to 3, wherein, - the second operation is ISIN FILTER-PROJECT operation. <Supplementary Note 5> - The method for optimizing data processing according to any one of Supplementary Notes 1 to 4, wherein, - the first operation is JOIN-PROJECT operation. <Supplementary Note 6> - An information processing apparatus, comprising: - a query analysis part that analyzes queries to be processed and determines whether or not a first operation is included in the queries to be processed; - a query optimization part that performs a query optimization process; and a query execution part that executes the queries to be processed after optimization by the query optimization part, wherein - the first operation comprises joining a first table and a second table, each having a common key, to generate a merged table, and projects a value of one or more project target column(s) of records in the merged table, - the query optimization process comprises determining whether content of the first operation satisfies a first condition and a second condition, if the query analysis part determines that the queries to be processed include the first operation, and replacing the first operation in the queries to be processed with a second operation, if the content of the first operation satisfies the first condition and the second condition, - the first condition is that each value of the common key in the second table is unique, - the second condition is that all of the project target columns are included in the first table, and - the second operation comprises; -- identifying a value(s) of the common key of record(s) in the second table, as a target value(s); and -- projecting value(s) of the project target column(s) of a record(s) having the target value(s) in the common key column of the first table. <Supplementary Note 7> - A program causing a computer performing optimizing data processing including a first operation, the first operation including joining a first table and a second table, each having a common key, to generate a merged table, and projecting a value of one or more project target column(s) of records in the merged table, to execute steps of: - determining whether content of the first operation satisfies a first condition and a second condition; and - replacing the first operation with a second operation, if the content of the first operation satisfies the first condition and the second condition, wherein, - the first condition is that each value of the common key in the second table is unique, - the second condition is that all of the project target columns are included in the first table, - the second operation comprises; -- identifying a value(s) of the common key of record(s) in the second table, as a target value(s); and -- projecting value(s) of the project target column(s) of a record(s) having the target value(s) in the common key column of the first table. - The above modes 6 and 7 can be expanded in the same way as mode 1 is expanded to modes 2 to 5.

[0082] It should be noted that, each disclosure of the NPLs cited above is incorporated herein by reference thereto. It is to be noted that it is possible to modify or adjust the example embodiments or examples within the whole disclosure of the present invention (including the Claims) and based on the basic technical concept thereof. Further, it is possible to variously combine or select (or partially delete) a wide variety of the disclosed elements (including the individual elements of the individual claims, the individual elements of the individual example embodiments or examples, and the individual elements of the individual figures) within the scope of the whole disclosure of the present invention. That is, it is self-explanatory that the present invention includes any types of variations and modifications to be done by a skilled person according to the whole disclosure including the Claims, and the technical concept of the present invention. Particularly, any numerical ranges disclosed herein should be interpreted that any intermediate values or subranges falling within the disclosed ranges are also concretely disclosed even without specific recital thereof. For example, the configurations illustrated in the drawings have been used only as examples to facilitate understanding of the present invention. That is, the present invention is not limited to the configurations illustrated in the drawings.

[0083] 100: student table 101: student identification information (S_id) 102: student name (S_name) 103: marks (S_marks) 104: country code (C_id) 110: determination result 111: filtered result 112: projected result 200: country table 201: country code (C_id) 202; country name (C_name) 200a: country table 210: filtered country table 300: merged table 301: projected result 500: information processing apparatus 510: query analysis part 520: query optimization part 530: query execution part 540: RDB storage part 591: CPU 592: main storage device 593: auxiliary storage device 594: communication I / F 595: extension I / F 900: relational database (RDB)

Claims

1. A method for optimizing data processing including a first operation, the first operation including joining a first table and a second table, each having a common key, to generate a merged table, and projecting a value of one or more project target column(s) of records in the merged table, the method comprising: determining by a computer whether content of the first operation satisfies a first condition and a second condition; and replacing the first operation with a second operation, if the content of the first operation satisfies the first condition and the second condition, wherein, the first condition is that each value of the common key in the second table is unique, the second condition is that all of the project target columns are included in the first table, and the second operation comprises; identifying a value(s) of the common key of record(s) in the second table, as a target value(s); and projecting value(s) of the project target column(s) of a record(s) having the target value(s) in the common key column of the first table.

2. The method for optimizing data processing according to claim 1, wherein, in the second operation, the value(s) of the project target column(s) of the record(s) in the first table, for which a value of the common key is the target value, is projected.

3. The method for optimizing data processing according to claim 1 or 2, wherein, the computer performs the first operation, if at least one of the first condition and the second condition is not satisfied.

4. The method for optimizing data processing according to any one of claims 1 to 3, wherein, the second operation is ISIN FILTER-PROJECT operation.

5. The method for optimizing data processing according to any one of claims 1 to 4, wherein, the first operation is JOIN-PROJECT operation.

6. An information processing apparatus, comprising: a query analysis part that analyzes queries to be processed and determines whether or not a first operation is included in the queries to be processed; a query optimization part that performs a query optimization process; and a query execution part that executes the queries to be processed after optimization by the query optimization part, wherein the first operation comprises joining a first table and a second table, each having a common key, to generate a merged table, and projects a value of one or more project target column(s) of records in the merged table, the query optimization process comprises determining whether content of the first operation satisfies a first condition and a second condition, if the query analysis part determines that the queries to be processed include the first operation, and replacing the first operation in the queries to be processed with a second operation, if the content of the first operation satisfies the first condition and the second condition, the first condition is that each value of the common key in the second table is unique, the second condition is that all of the project target columns are included in the first table, and the second operation comprises; identifying a value(s) of the common key of record(s) in the second table, as a target value(s); and projecting value(s) of the project target column(s) of a record(s) having the target value(s) in the common key column of the first table.

7. A program causing a computer performing optimizing data processing including a first operation, the first operation including joining a first table and a second table, each having a common key, to generate a merged table, and projecting a value of one or more project target column(s) of records in the merged table, to execute steps of: determining whether content of the first operation satisfies a first condition and a second condition; and replacing the first operation with a second operation, if the content of the first operation satisfies the first condition and the second condition, wherein, the first condition is that each value of the common key in the second table is unique, the second condition is that all of the project target columns are included in the first table, the second operation comprises; identifying a value(s) of the common key of record(s) in the second table, as a target value(s); and projecting value(s) of the project target column(s) of a record(s) having the target value(s) in the common key column of the first table.

Citation Information

Patent Citations

  • Database arithmetic processor

    JP2002024281A

  • Database system providing methodology for eager and opportunistic property enforcement

    US20030172059A1

  • View matching for materialized outer-join views

    US20060282424A1

  • Generating extract, transform, and load (ETL) jobs for loading data incrementally

    US20110055147A1

  • Boomerang join: a network efficient, late-materialized, distributed join technique

    US20190104175A1