JP6381823B2 - System, method and program for speeding up database processing - Google Patents
System, method and program for speeding up database processing Download PDFInfo
- Publication number
- JP6381823B2 JP6381823B2 JP2017545609A JP2017545609A JP6381823B2 JP 6381823 B2 JP6381823 B2 JP 6381823B2 JP 2017545609 A JP2017545609 A JP 2017545609A JP 2017545609 A JP2017545609 A JP 2017545609A JP 6381823 B2 JP6381823 B2 JP 6381823B2
- Authority
- JP
- Japan
- Prior art keywords
- storage device
- data
- parallel
- execution plan
- query execution
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (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)
Description
本願発明は、データベース処理の高速化のためのシステム、方法、及び、プログラム、特に、グラフィックプロセッサとピアツーピアDMAを利用した高速化を実現するシステム、方法、及び、プログラムに関する。 The present invention relates to a system, method, and program for speeding up database processing, and more particularly to a system, method, and program for realizing speedup using a graphic processor and peer-to-peer DMA.
データベース管理システム(DBMS)、特に、リレーショナルデータベース管理システム(RDBMS)が今日の情報システムにおいて不可欠な構成要素となっている。ゆえに、RDBMSの処理高速化は情報システムの効率性向上のためにきわめて重要であり、多くの高速化技術が提案されている。 A database management system (DBMS), in particular, a relational database management system (RDBMS) has become an indispensable component in today's information systems. Therefore, speeding up the processing of the RDBMS is extremely important for improving the efficiency of the information system, and many speeding up techniques have been proposed.
そのような高速化技術のひとつとして、グラフィック・プロセッシング・ユニット(GPU)を使用したものが知られている。GPUは今日のパーソナルコンピューターやゲーム機において一般的な構成要素となっており、安価に入手可能である一方で、実質的には多数のコアを備えた並列処理プロセッサであることから、グラフィック処理以外にも汎用的応用が可能である。このような応用手法は一般にGPGPU(ジェネラル・パーパスGPU)とも呼ばれる。GPGPUによるデータベースアクセスの高速化技術については非特許文献1、及び、非特許文献2に記載されたもの等が知られている。 As one of such high-speed technologies, one using a graphic processing unit (GPU) is known. GPUs are a common component in today's personal computers and game consoles and are available at low cost, but are essentially parallel processors with many cores, so they are not graphics processing. In addition, general-purpose applications are possible. Such an application method is generally called GPGPU (General Purpose GPU). Non-Patent Document 1 and Non-Patent Document 2 are known as techniques for speeding up database access by GPGPU.
従来のGPGPUによるデータベースアクセスの高速化技術においては、処理対象データの二次記憶装置(ストレージ)から主記憶装置(メインメモリー)上への移動が性能上のボトルネックとなっていた。ストレージ上のデータベースに格納されたデータの処理を行なうためには、中央処理装置(CPU)がまず主記憶装置上にバッファ領域を確保し、次に二次記憶装置から当該バッファへデータをロードし、ロード処理が完了してはじめて、二次記憶装置内に保管されていたデータにアクセスすることが可能であった。 In the conventional database access speed-up technology using GPGPU, the movement of processing target data from the secondary storage device (storage) to the main storage device (main memory) has become a bottleneck in performance. In order to process data stored in a database on the storage, the central processing unit (CPU) first secures a buffer area on the main storage device, and then loads data from the secondary storage device to the buffer. Only when the loading process is completed can it be possible to access the data stored in the secondary storage device.
現時点での一般的ハードウェア技術では、CPUとメインメモリー間の帯域は毎秒50GBから毎秒300GBであるのに対し、ストレージとCPUを接続する周辺装置バスの帯域は毎秒4GBから15GB程度であり、後者が性能上のボトルネックとなることが不可避であった。従来のデータベース処理方式ではこのボトルネックを通じて大量のデータを転送することが必要であり、GPGPUによる並列処理の性能向上効果が相殺されるという問題があった。 In the current general hardware technology, the bandwidth between the CPU and the main memory is 50 GB to 300 GB per second, whereas the bandwidth of the peripheral device bus connecting the storage and the CPU is about 4 GB to 15 GB per second. Inevitably become a bottleneck in performance. In the conventional database processing method, it is necessary to transfer a large amount of data through this bottleneck, and there is a problem that the performance improvement effect of parallel processing by GPGPU is offset.
安価に実装可能なデータベースクエリー高速化システム、方法、及び、プログラムを提供する。 A database query acceleration system, method, and program that can be implemented at low cost are provided.
本願発明は、二次記憶装置と主記憶装置と中央処理装置と並列処理装置と周辺装置バスと前記二次記憶装置に保存された関係データベースとを含むデータベース処理システムにおいて実行されるデータ処理方法であって、
前記中央処理装置が、クエリー実行計画を受信するステップと、
前記中央処理装置が、前記二次記憶装置に対して、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内のデータを前記主記憶装置を経由することなく前記並列処理装置に転送させる命令を発行するステップと、
前記二次記憶装置が、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内の前記データを前記主記憶装置を経由することなく、かつ、前記中央処理装置を介在させることなく、前記並列処理装置に転送するステップと、
前記並列処理装置が、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内の前記データを並列的に処理するステップと、
前記並列処理装置が、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内の前記データを処理した結果を前記中央処理装置を介在させることなく、前記主記憶装置に書き込むステップとを
含むデータ処理方法を提供することで前記課題を解決する。
The present invention is a data processing method executed in a database processing system including a secondary storage device , a main storage device, a central processing device, a parallel processing device, a peripheral device bus, and a relational database stored in the secondary storage device. There,
The central processing unit receiving a query execution plan;
The central processing unit causes the secondary storage device to transfer the data in the table specified in the query execution plan in the relational database to the parallel processing device without going through the main storage device. Issuing a command;
The secondary storage device passes the data in the table specified in the query execution plan in the relational database without passing through the main storage device and without interposing the central processing unit. Transferring to a parallel processing unit;
The parallel processing device processing the data in the table specified in the query execution plan in the relational database in parallel;
The parallel processing unit writing the result of processing the data in the table specified in the query execution plan in the relational database to the main storage without interposing the central processing unit. The problem is solved by providing a data processing method.
また、本願発明は、前記主記憶装置に書き込む前記ステップは、前記並列的に処理するステップの結果のうち前記クエリー実行計画において使用される列データのみを対象とする
段落0008に記載のデータ処理方法を提供することで前記課題を解決する。
Further, according to the present invention, the step of writing to the main storage device targets only column data used in the query execution plan among the results of the step of processing in parallel. The above-mentioned problem is solved by providing a data processing method.
また、本願発明は、二次記憶装置と主記憶装置と中央処理装置と並列処理装置と周辺装置バスと前記二次記憶装置に保存された関係データベースとを含むデータベース処理システムにおいて実行されるデータ処理プログラムであって、
前記中央処理装置に、クエリー実行計画を受信させる命令と、
前記中央処理装置に、前記二次記憶装置に対して、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内のデータを前記主記憶装置を経由することなく前記並列処理装置に転送させる命令を発行させる命令と、
前記二次記憶装置に、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内の前記データを前記主記憶装置を経由することなく、かつ、前記中央処理装置を介在させることなく、前記並列処理装置に転送させる命令と、
前記並列処理装置に、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内の前記データを並列的に処理させる命令と、
前記並列処理装置に、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内の前記データを処理した結果を前記中央処理装置を介在させることなく、前記主記憶装置に書き込ませる命令とを
含むデータ処理プログラムを提供することで前記課題を解決する。
The present invention also provides a data processing executed in a database processing system including a secondary storage device , a main storage device, a central processing unit, a parallel processing device, a peripheral device bus, and a relational database stored in the secondary storage device. A program,
Instructions for causing the central processing unit to receive a query execution plan;
Said central processing unit, to the secondary storage device, to transfer the data in the specified table in the query execution plan in in the relational database to the parallel processing unit without passing through said main memory An instruction to issue an instruction;
In the secondary storage device , the data in the table specified in the query execution plan in the relational database without passing through the main storage device and without interposing the central processing unit, Instructions to be transferred to the parallel processor;
An instruction for causing the parallel processing device to process the data in the table specified in the query execution plan in the relational database in parallel;
An instruction for causing the parallel processing device to write the result of processing the data in the table specified in the query execution plan in the relational database to the main storage without interposing the central processing unit. The above-described problem is solved by providing a data processing program including the above-described data processing program.
また、本願発明は、前記主記憶装置に書き込ませる前記命令は、前記並列的に処理させる命令の結果のうち前記クエリー実行計画において使用される列データのみを対象とする
段落0010に記載のデータ処理プログラムを提供することで前記課題を解決する。
Further, according to the present invention, the instruction to be written to the main storage device is intended only for column data used in the query execution plan among the results of the instruction to be processed in parallel. Paragraph 0010 The above problem is solved by providing the data processing program described.
また、本願発明は、二次記憶装置と主記憶装置と中央処理装置と並列処理装置と周辺装置バスと前記二次記憶装置に保存された関係データベースとを含むデータベース処理システムであって、
前記中央処理装置は、クエリー実行計画を受信し、
前記中央処理装置は、前記二次記憶装置に対して、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内のデータを前記主記憶装置を経由することなく前記並列処理装置に転送させる命令を発行し、
前記二次記憶装置は、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内の前記データを前記主記憶装置を経由することなく、かつ、前記中央処理装置を介在させることなく、前記並列処理装置に転送し、
前記並列処理装置は、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内の前記データを並列的に処理し、
前記並列処理装置は、前記データベース中の前記クエリー実行計画中で指定されたテーブル内の前記データを処理した結果を前記中央処理装置を介在させることなく、前記主記憶装置に書き込む
データベース処理システムを提供することで前記課題を解決する。
The present invention is a database processing system including a secondary storage device , a main storage device, a central processing unit, a parallel processing device, a peripheral device bus, and a relational database stored in the secondary storage device ,
The central processing unit receives a query execution plan,
The central processing unit causes the secondary storage device to transfer the data in the table specified in the query execution plan in the relational database to the parallel processing device without going through the main storage device. Issue an order,
The secondary storage device passes the data in the table specified in the query execution plan in the relational database without passing through the main storage device and without interposing the central processing unit. Transfer to a parallel processor,
The parallel processing device processes the data in the table specified in the query execution plan in the relational database in parallel,
The parallel processing device provides a database processing system that writes the result of processing the data in the table specified in the query execution plan in the database to the main storage without interposing the central processing unit This solves the problem.
また、本願発明は、前記並列処理装置は、前記並列的に処理させる命令の結果のうち前記クエリー実行計画において使用される列データのみを前記主記憶装置に書き込む
段落0012に記載のデータベース処理システムを提供することで前記課題を解決する。
Further, according to the present invention, in the parallel processing device, only column data used in the query execution plan among the results of the instructions to be processed in parallel is written in the main storage device . The problem is solved by providing a database processing system.
周辺装置バスの性能ボトルネックに影響を受けにくいデータベースクエリー高速化システム、方法、及び、プログラムが安価に実装可能になる。 A database query acceleration system, method, and program that are not easily affected by the performance bottleneck of the peripheral device bus can be implemented at low cost.
以下に図を参照しながら本願発明の実施例について説明する。 Embodiments of the present invention will be described below with reference to the drawings.
図1に本願発明の実施例に係る計算機の機能構成の一例を示す。中央処理装置(101)は、主記憶装置(102)に格納されたプログラムの実行、及び、主記憶装置(102)と二次記憶装置(103)間のデータの移動を行なう。中央処理装置(101)は一般的なコンピューターに使用されているプロセッサ(CPU)であってよい。主記憶装置(102)は一般的なコンピューターに使用されているDRAMであってよい。並列処理装置(104)は多数のコアを有して、並列的な処理を行なうことができるプロセッサであり、グラフィカル・プロセッシング・ユニット(GPU)であってよい。また、並列処理装置(104)は、MIC(Many Integrated Core)と呼ばれる多数のコアを備えた設計のプロセッサやFGPA(Programmable Gate Array)で実装された専用設計プロセッサであってもよい。以降、これらを総称してコプロセッサとも呼ぶ。周辺装置バス(106)は、主記憶装置(102)と二次記憶装置(103)と並列処理装置(104)とを接続する手段であり、ピアツーピアのDMA(ダイレクト・メモリ・アクセス)をサポートする。周辺装置バス(106)は、業界標準であるPCI−EにSSD(半導体ディスク)を接続するNVMe機能を供えたものであることが望ましい。二次記憶装置(103)はフラッシュ・メモリーのテクノロジーに基づくSSDであることが望ましい。また、図示していないが、本願発明に係る計算機は、ネットワークを介してデータやユーザーによる要求を送受信するためのネットワーク接続機能等を備えていてもよい。 FIG. 1 shows an example of a functional configuration of a computer according to an embodiment of the present invention. The central processing unit (101) executes a program stored in the main storage device (102) and moves data between the main storage device (102) and the secondary storage device (103). The central processing unit (101) may be a processor (CPU) used in a general computer. The main storage device (102) may be a DRAM used in a general computer. The parallel processing device (104) is a processor that has a large number of cores and can perform parallel processing, and may be a graphical processing unit (GPU). In addition, the parallel processing device (104) may be a processor with a large number of cores called MIC (Many Integrated Core) or a dedicated design processor implemented with FGPA (Programmable Gate Array). Hereinafter, these are collectively referred to as a coprocessor. The peripheral device bus (106) is a means for connecting the main storage device (102), the secondary storage device (103), and the parallel processing device (104), and supports peer-to-peer DMA (direct memory access). . The peripheral device bus (106) is desirably provided with an NVMe function for connecting an SSD (semiconductor disk) to the industry standard PCI-E. The secondary storage device (103) is preferably an SSD based on flash memory technology. Although not shown, the computer according to the present invention may be provided with a network connection function for transmitting and receiving data and user requests via the network.
図2に本願発明に係るリレーショナルDBMSソフトウェアの機能構成の一例を示す。まず、クエリー構文解析部(201)がSQL形式で記述されたクエリー文を受け取り、内部形式であるクエリー構文木を作成する。次に、クエリー最適化部(202)がクエリー構文木に対する最適化処理を行ない内部形式であるクエリー実行計画を作成する。クエリー実行計画は中央処理装置(101)および並列処理装置(104)により実行され、データベース内に格納されたデータに対する照会(クエリー)、結合(ジョイン)、分類(ソート)、集約(アグリゲート)等の処理が行なわれる。なお、本願発明は、リレーショナルDBMSに限らず大量データに対する並列的な処理を行なうあらゆるデータベース管理システムに広く適用可能である。 FIG. 2 shows an example of the functional configuration of the relational DBMS software according to the present invention. First, the query syntax analysis unit (201) receives a query sentence described in the SQL format, and creates a query syntax tree that is an internal format. Next, the query optimization unit (202) performs an optimization process on the query syntax tree and creates a query execution plan which is an internal format. The query execution plan is executed by the central processing unit (101) and the parallel processing unit (104), and queries (queries), joins (joins), classifications (sorts), aggregations (aggregates), etc. for the data stored in the database. Is performed. The present invention is not limited to a relational DBMS, and can be widely applied to any database management system that performs parallel processing on a large amount of data.
図3に本願発明の実施例に係るリレーショナルDBMSのクエリー実行計画の一例を示す。一般に、クエリーは走査処理と結合処理により表わされる。走査処理はリレーショナルDBMS中のテーブルから走査条件(たとえば、指定されたコラム(列、フィールド)の値が指定された数値範囲内にあることに合致する行(レコード、タプル)のみを読み出す処理である(SQL文で表現すれば、たとえば、SELECT ORDER_ID FROM ORDER WHERE SUM>10000))。結合処理(ジョイン)は特定コラムの値が合致する行を複数のテーブルから組み合わせて出力する処理である(SQL文で表現すれば、たとえば、SELECT CMASTER.CUSTOMER_NAME FROM ORDER, CMASTER WHERE ORDER.CUSTOMER =CMASTER.CUSTOMER_ID)。いずれも、リレーショナルDBMSにおいて典型的に行なわれる処理であり、両者を効率化することが情報システム全体の効率化に結びつく。両者とも大量のデータが扱われることから、データの移動、特に、性能上のボトルネックとなる周辺装置バス(106)を経由するデータの移動を最小化することが重要である。 FIG. 3 shows an example of a relational DBMS query execution plan according to an embodiment of the present invention. In general, a query is represented by a scan process and a join process. The scanning process is a process of reading only rows (records, tuples) that match a scanning condition (for example, a specified column (column, field) value is within a specified numerical range) from a table in the relational DBMS. (For example, in the SQL statement, SELECT ORDER_ID FROM ORDER WHERE SUM> 10000)). Join processing (join) is processing that outputs a combination of rows that match the value of a specific column from multiple tables (for example, SELECT CMASTER.CUSTOMER_NAME FROM ORDER, CMASTER WHERE ORDER.CUSTOMER = CMASTER .CUSTOMER_ID). Both are processes typically performed in a relational DBMS, and improving the efficiency of both leads to the efficiency of the entire information system. Since both handle large amounts of data, it is important to minimize the movement of data, especially the movement of data via the peripheral device bus (106), which is a bottleneck in performance.
図4に、本願発明の実施例に係るリレーショナルDBMSの処理方式の第一の例を示す。ここでは、図3の走査処理の一部における処理の例を示す。図4で太線の矢印線はデータの流れを、破線の矢印線は制御の流れ、または、論理的な関係を表わす。まず、中央処理装置(101)が、クエリー実行計画の走査条件にしたがって、並列処理装置(104)が実行できる命令列を動的に生成し、主記憶装置(102)上に置く(S401)。テーブルの走査処理は多数の行に対して同一の処理(たとえば、数値範囲のチェック)を行なうものであるため、並列処理装置(104)向け命令を生成することは容易である。次に、中央処理装置(101)が、生成した命令列を主記憶装置(102)から並列処理装置(104)に転送する(S402)。次に、中央処理装置(101)が、二次記憶装置(103)に対して、処理対象となるデータベース中の行の集合を並列処理装置(104)に転送する命令を発行する(S403)。この命令はピアツーピアDMAによるデータ転送を起動するものであることが望ましい。次に、二次記憶装置(103)が、この命令にしたがって、処理対象となるデータベース中の行の集合を並列処理装置(104)に、主記憶装置(102)を経由することなく転送する(この転送処理に中央処理装置(101)は介在しない設計とすることが望ましい)(S404)。次に、並列処理装置(104)が所定の走査処理を行ない、走査条件に合致した行だけを主記憶装置(102)に転送する(S405)。さらに、転送対象となった各行内で、以降の処理で必要となる列(コラム、フィールド)(たとえば、上記のSQL文の例で言えば列ORDER_IDに相当するデータ)の関連データのみを転送することが望ましい。ここで、処理対象となるデータはデータベースの各ブロックであってよく、並列処理装置(104)は最終的に使用される行(すなわち、走査条件を満足する行)のみを並列処理装置(104)内の結果バッファに置き、中央処理装置(101)を介在することなく、ピアツーピアDMAで結果バッファから主記憶装置(102)への転送を行なう設計とすることが望ましい。本願発明の方式では、最終的に必要なデータだけが主記憶装置(102)に置かれることになり、一時的な作業のためだけに大量のデータが周辺装置バス(106)を経由して主記憶装置(102)上に転送されることがないため、中央処理装置(101)の処理負荷、主記憶装置(メモリー)の消費量、及び、周辺装置バス(106)の帯域幅を削減できる。加えて、データ転送のために必要な時間も短縮可能であり、データベース処理システム全体の効率性を向上できる。 FIG. 4 shows a first example of the relational DBMS processing method according to the embodiment of the present invention. Here, an example of processing in a part of the scanning processing of FIG. 3 is shown. In FIG. 4, a thick arrow line represents a data flow, and a broken arrow line represents a control flow or a logical relationship. First, the central processing unit (101) dynamically generates an instruction sequence that can be executed by the parallel processing unit (104) according to the scanning condition of the query execution plan, and places it on the main storage unit (102) (S401). Since the table scanning process performs the same process (for example, numerical value range check) on a large number of rows, it is easy to generate an instruction for the parallel processing device (104). Next, the central processing unit (101) transfers the generated instruction sequence from the main storage unit (102) to the parallel processing unit (104) (S402). Next, the central processing unit (101) issues a command for transferring a set of rows in the database to be processed to the parallel processing unit (104) to the secondary storage unit (103) (S403). This command is preferably to initiate data transfer by peer-to-peer DMA. Next, the secondary storage device (103) transfers a set of rows in the database to be processed to the parallel processing device (104) without going through the main storage device (102) in accordance with this command ( It is desirable that the central processing unit (101) is designed not to intervene in this transfer process) (S404). Next, the parallel processing device (104) performs a predetermined scanning process, and only the rows that meet the scanning conditions are transferred to the main memory (102) (S405). Further, only the relevant data in the columns (columns, fields) required for the subsequent processing (for example, data corresponding to the column ORDER_ID in the example of the above SQL statement) is transferred in each row to be transferred. It is desirable. Here, the data to be processed may be each block of the database, and the parallel processing device (104) selects only the row that is finally used (that is, the row that satisfies the scanning condition). It is desirable that the data is transferred from the result buffer to the main storage device (102) by peer-to-peer DMA without using the central processing unit (101). In the method of the present invention, only necessary data is finally placed in the main storage device (102), and a large amount of data is mainly transferred via the peripheral device bus (106) only for temporary work. Since the data is not transferred onto the storage device (102), the processing load of the central processing unit (101), the consumption of the main storage device (memory), and the bandwidth of the peripheral device bus (106) can be reduced. In addition, the time required for data transfer can be shortened, and the efficiency of the entire database processing system can be improved.
図5に、本願発明の実施例に係るリレーショナルDBMSのデータ処理方式の第二の例を示す。この例では結合処理と走査処理の組み合わせの効率化を示す。図5では、図4と同様に太線の矢印線はデータの流れを、破線の矢印線は制御の流れを表わす。図5では、主記憶装置(102)上に走査条件Aに合致するテーブルAの行(レコード、タプル)が既にロードされているものとする。このロード処理は図4に示したような効率性が高い方法で行なわれていることが望ましい。まず、中央処理装置(101)が、クエリー実行計画の結合条件と走査条件Bにしたがって、並列処理装置(104)が実行できる命令列を動的に生成し、主記憶装置(102)上に置く(S501)。テーブルの結合処理と走査処理は多数の行に対して同一の処理を行なうものであるため、並列処理装置(104)向け命令を生成することは容易である。次に、中央処理装置(101)が、生成した命令列とテーブルAの処理対象行とを主記憶装置(102)から並列処理装置(104)に転送する(S502)。次に、中央処理装置(101)が、二次記憶装置(103)に対して、処理対象となるデータベース中の行の集合を並列処理装置(104)に転送する命令を発行する(S503)。この命令はピアツーピアDMAによるデータ転送を起動するものであることが望ましい。次に、二次記憶装置(103)が、この命令にしたがって、データベース中のテーブルBの行の集合を並列処理装置(104)に、主記憶装置(102)を経由することなく転送する(この転送処理に中央処理装置(101)は介在しない設計とすることが望ましい)(S504)。次に、並列処理装置(104)が所定の結合処理と走査処理を行ない、結合条件と走査条件Bに合致した行だけを主記憶装置(102)に転送する(S505)。さらに、転送対象となった各行内で、以降の処理で必要となる列(コラム、フィールド)の関連データのみを転送することが望ましい。ここで、処理対象となるデータはデータベースの各ブロックであってよく、並列処理装置(104)は最終的に使用される行(すなわち、走査条件Bと結合条件とを満足する行)のみを並列処理装置(104)内の結果バッファに置き、中央処理装置(101)を介在することなく、ピアツーピアDMAで結果バッファから主記憶装置(102)への転送を行なう設計とすることが望ましい。図4で示した例と同様に、本願発明の方式では、最終的に必要なデータだけが主記憶装置(102)に置かれることになり、一時的な作業のためだけに大量のデータが周辺装置バス(106)を経由して主記憶装置(102)上に転送されることがないため、中央処理装置(101)の処理負荷、メモリーの消費量、及び、周辺装置バス(106)の帯域幅を削減できる。加えて、データ転送のために必要な時間も短縮可能であり、データベース処理システム全体の効率性を向上できる。 FIG. 5 shows a second example of the data processing method of the relational DBMS according to the embodiment of the present invention. In this example, the efficiency of the combination of the combining process and the scanning process is shown. In FIG. 5, as in FIG. 4, a thick arrow line represents a data flow, and a broken arrow line represents a control flow. In FIG. 5, it is assumed that the row (record, tuple) of the table A that matches the scanning condition A has already been loaded on the main storage device (102). It is desirable that this loading process be performed by a highly efficient method as shown in FIG. First, the central processing unit (101) dynamically generates an instruction sequence that can be executed by the parallel processing unit (104) in accordance with the join condition of the query execution plan and the scanning condition B, and places it on the main storage unit (102). (S501). Since the table join process and the scan process perform the same process for many rows, it is easy to generate an instruction for the parallel processing device (104). Next, the central processing unit (101) transfers the generated instruction sequence and the processing target row of the table A from the main storage unit (102) to the parallel processing unit (104) (S502). Next, the central processing unit (101) issues an instruction for transferring a set of rows in the database to be processed to the parallel processing unit (104) to the secondary storage unit (103) (S503). This command is preferably to initiate data transfer by peer-to-peer DMA. Next, the secondary storage device (103) transfers the set of rows of the table B in the database to the parallel processing device (104) without passing through the main storage device (102) according to this command (this It is desirable that the central processing unit (101) is designed not to intervene in the transfer process) (S504). Next, the parallel processing device (104) performs predetermined combining processing and scanning processing, and transfers only the rows that match the combining condition and scanning condition B to the main memory (102) (S505). Furthermore, it is desirable to transfer only relevant data of columns (columns, fields) required for the subsequent processing within each row to be transferred. Here, the data to be processed may be each block of the database, and the parallel processing device (104) parallels only the rows that are finally used (that is, the rows that satisfy the scanning condition B and the combining condition). It is desirable to design the transfer from the result buffer to the main memory (102) by peer-to-peer DMA without using the central processing unit (101) and placing it in the result buffer in the processing unit (104). Similar to the example shown in FIG. 4, according to the method of the present invention, only the necessary data is finally placed in the main storage device (102), and a large amount of data is stored only for temporary work. Since it is not transferred to the main storage device (102) via the device bus (106), the processing load of the central processing unit (101), the amount of memory consumption, and the bandwidth of the peripheral device bus (106) The width can be reduced. In addition, the time required for data transfer can be shortened, and the efficiency of the entire database processing system can be improved.
(本願発明による技術的に顕著な効果)
本願発明により、以下のような技術的に顕著な効果が得られる。第一に、不要なデータをロードするための領域を主記憶装置上に確保する必要がなくなり、必要なメモリー容量を削減できる。第二に、クエリー処理を並列度の高いコプロセッサにより並列・非同期に処理するため、CPU側の負荷が下げる事が可能であり、ひいてはクエリーの応答時間を短縮できる。第三に、既に市場に広く出回っているコモデティ製品のみを用いて実現可能であり、安価に実現可能である。(Technologically significant effect of the present invention)
According to the present invention, the following technically significant effects can be obtained. First, it is not necessary to secure an area for loading unnecessary data on the main storage device, and the required memory capacity can be reduced. Second, since query processing is processed in parallel and asynchronously by a coprocessor with a high degree of parallelism, the load on the CPU side can be reduced, and the response time of the query can be shortened. Third, it can be realized using only commodity products already on the market, and can be realized at low cost.
Claims (6)
前記中央処理装置が、クエリー実行計画を受信するステップと、
前記中央処理装置が、前記二次記憶装置に対して、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内のデータを前記主記憶装置を経由することなく前記並列処理装置に転送させる命令を発行するステップと、
前記二次記憶装置が、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内の前記データを前記主記憶装置を経由することなく、かつ、前記中央処理装置を介在させることなく、前記並列処理装置に転送するステップと、
前記並列処理装置が、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内の前記データの走査、結合、または、集約を並列的に処理するステップと、
前記並列処理装置が、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内の前記データを処理した結果を前記中央処理装置を介在させることなく、前記主記憶装置に書き込むステップとを
含むデータ処理方法。 A data processing method executed in a database processing system including a secondary storage device, a main storage device, a central processing device, a parallel processing device, a peripheral device bus, and a relational database stored in the secondary storage device,
The central processing unit receiving a query execution plan;
The central processing unit causes the secondary storage device to transfer the data in the table specified in the query execution plan in the relational database to the parallel processing device without going through the main storage device. Issuing a command;
The secondary storage device passes the data in the table specified in the query execution plan in the relational database without passing through the main storage device and without interposing the central processing unit. Transferring to a parallel processing unit;
The parallel processing device processing in parallel the scan, join or aggregation of the data in the table specified in the query execution plan in the relational database;
The parallel processing unit writing the result of processing the data in the table specified in the query execution plan in the relational database to the main storage without interposing the central processing unit. Data processing method.
請求項1に記載のデータ処理方法。 The data processing method according to claim 1, wherein the step of writing to the main storage device targets only column data used in the query execution plan among the results of the step of processing in parallel.
前記中央処理装置に、クエリー実行計画を受信させる命令と、
前記中央処理装置に、前記二次記憶装置に対して、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内のデータを前記主記憶装置を経由することなく前記並列処理装置に転送させる命令を発行させる命令と、
前記二次記憶装置に、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内の前記データを前記主記憶装置を経由することなく、かつ、前記中央処理装置を介在させることなく、前記並列処理装置に転送させる命令と、
前記並列処理装置に、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内の前記データの走査、結合、または、集約を並列的に処理させる命令と、
前記並列処理装置に、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内の前記データを処理した結果を前記中央処理装置を介在させることなく、前記主記憶装置に書き込ませる命令とを
含むデータ処理プログラム。 A data processing program executed in a database processing system including a secondary storage device, a main storage device, a central processing device, a parallel processing device, a peripheral device bus, and a relational database stored in the secondary storage device,
Instructions for causing the central processing unit to receive a query execution plan;
Causing the central processing unit to transfer the data in the table specified in the query execution plan in the relational database to the parallel processing unit without passing through the main storage unit. An instruction to issue an instruction;
In the secondary storage device, the data in the table specified in the query execution plan in the relational database without passing through the main storage device and without interposing the central processing unit, Instructions to be transferred to the parallel processor;
An instruction that causes the parallel processing device to process in parallel the scanning, joining, or aggregation of the data in the table specified in the query execution plan in the relational database;
An instruction for causing the parallel processing device to write the result of processing the data in the table specified in the query execution plan in the relational database to the main storage without interposing the central processing unit. Including data processing program.
請求項3に記載のデータ処理プログラム。 The data processing program according to claim 3, wherein the instruction to be written to the main storage device targets only column data used in the query execution plan among results of the instructions to be processed in parallel.
前記中央処理装置は、クエリー実行計画を受信し、
前記中央処理装置は、前記二次記憶装置に対して、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内のデータを前記主記憶装置を経由することなく前記並列処理装置に転送させる命令を発行し、
前記二次記憶装置は、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内の前記データを前記主記憶装置を経由することなく、かつ、前記中央処理装置を介在させることなく、前記並列処理装置に転送し、
前記並列処理装置は、前記関係データベース中の前記クエリー実行計画中で指定されたテーブル内の前記データの走査、結合、または、集約を並列的に処理し、
前記並列処理装置は、前記データベース中の前記クエリー実行計画中で指定されたテーブル内の前記データを処理した結果を前記中央処理装置を介在させることなく、前記主記憶装置に書き込む
データベース処理システム。 A database processing system including a secondary storage device, a main storage device, a central processing unit, a parallel processing device, a peripheral device bus, and a relational database stored in the secondary storage device;
The central processing unit receives a query execution plan,
The central processing unit causes the secondary storage device to transfer the data in the table specified in the query execution plan in the relational database to the parallel processing device without going through the main storage device. Issue an order,
The secondary storage device passes the data in the table specified in the query execution plan in the relational database without passing through the main storage device and without interposing the central processing unit. Transfer to a parallel processor,
The parallel processing device processes, in parallel , scanning, joining, or aggregation of the data in the table specified in the query execution plan in the relational database,
The database processing system, wherein the parallel processing device writes the result of processing the data in the table specified in the query execution plan in the database to the main storage without interposing the central processing unit.
請求項5に記載のデータベース処理システム。 6. The database processing system according to claim 5, wherein the parallel processing device writes only column data used in the query execution plan among the results of the instructions to be processed in parallel to the main storage device.
Applications Claiming Priority (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015228245 | 2015-11-22 | ||
JP2015228245 | 2015-11-22 | ||
PCT/JP2016/076110 WO2017085985A1 (en) | 2015-11-22 | 2016-09-06 | System, method, and program for database processing acceleration |
Publications (2)
Publication Number | Publication Date |
---|---|
JPWO2017085985A1 JPWO2017085985A1 (en) | 2017-11-24 |
JP6381823B2 true JP6381823B2 (en) | 2018-08-29 |
Family
ID=58719175
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2017545609A Active JP6381823B2 (en) | 2015-11-22 | 2016-09-06 | System, method and program for speeding up database processing |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP6381823B2 (en) |
WO (1) | WO2017085985A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6829427B2 (en) * | 2018-12-09 | 2021-02-10 | 浩平 海外 | Systems, methods, and programs for streamlining database queries |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6862027B2 (en) * | 2003-06-30 | 2005-03-01 | Microsoft Corp. | System and method for parallel execution of data generation tasks |
US8621446B2 (en) * | 2010-04-29 | 2013-12-31 | International Business Machines Corporation | Compiling software for a hierarchical distributed processing system |
JP2014056425A (en) * | 2012-09-12 | 2014-03-27 | Nippon Telegr & Teleph Corp <Ntt> | Data management device, data management system, process allocation method, and process allocation program |
JP2014170259A (en) * | 2013-03-01 | 2014-09-18 | Hitachi Ltd | Data processing method, data processing system and data processing program |
WO2015105043A1 (en) * | 2014-01-08 | 2015-07-16 | 日本電気株式会社 | Computing system, database management device and computing method |
-
2016
- 2016-09-06 JP JP2017545609A patent/JP6381823B2/en active Active
- 2016-09-06 WO PCT/JP2016/076110 patent/WO2017085985A1/en active Application Filing
Also Published As
Publication number | Publication date |
---|---|
JPWO2017085985A1 (en) | 2017-11-24 |
WO2017085985A1 (en) | 2017-05-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Larson et al. | SQL server column store indexes | |
Halstead et al. | Accelerating join operation for relational databases with FPGAs | |
CN103309958B (en) | The star-like Connection inquiring optimization method of OLAP under GPU and CPU mixed architecture | |
Wang et al. | A study of data partitioning on OpenCL-based FPGAs | |
CN105069149A (en) | Structured line data-oriented distributed parallel data importing method | |
CN104239529A (en) | Method and device for preventing Hive data from being inclined | |
CN107430628A (en) | Acceleration framework with immediate data transmission mechanism | |
Watanabe et al. | Column-oriented database acceleration using FPGAs | |
CN113761024B (en) | Real-time query method and system of distributed SQL | |
CN104504008B (en) | A kind of Data Migration algorithm based on nested SQL to HBase | |
US10394459B2 (en) | Data storage device for filtering page in two steps, system including the same, and method of operating the same | |
CN109033301A (en) | A kind of db transaction execution method based on graphics processor | |
US12254195B2 (en) | Sparse matrix operations using processing-in-memory | |
WO2016185542A1 (en) | Computer system, accelerator, and database processing method | |
JP6381823B2 (en) | System, method and program for speeding up database processing | |
CN104820659B (en) | A kind of multi-mode dynamic towards coarseness reconfigurable system can match somebody with somebody high speed memory access interface | |
US20190354521A1 (en) | Concurrent Data Processing in a Relational Database Management System Using On-Board and Off-Board Processors | |
JP6829427B2 (en) | Systems, methods, and programs for streamlining database queries | |
US12001427B2 (en) | Systems, methods, and devices for acceleration of merge join operations | |
Boeschen et al. | GOLAP: A GPU-in-Data-Path Architecture for High-Speed OLAP | |
US9626397B2 (en) | Discounted future value operations on a massively parallel processing system and methods thereof | |
US11776594B2 (en) | Scalable in situ DRAM-based accelerators and methods of operating the same | |
JP7138313B1 (en) | Method and program for efficient processing of computational storage | |
Li et al. | RPK-table based efficient algorithm for join-aggregate query on MapReduce | |
Bellas et al. | GPU processing of theta‐joins |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170825 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20170824 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20170825 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20170830 |
|
A975 | Report on accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A971005 Effective date: 20170926 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20171020 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20180226 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20180425 |
|
A911 | Transfer to examiner for re-examination before appeal (zenchi) |
Free format text: JAPANESE INTERMEDIATE CODE: A911 Effective date: 20180515 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20180730 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20180731 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6381823 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |