ColumnStoreユーザーモジュール

You are viewing an old version of this article. View the current version here.

ユーザーモジュールはエンドユーザーからのクエリ操作を管理します。各クエリの状態を管理し、クエリ処理を行うためにパフォーマンスモジュールへ処理を委譲します。全てのパフォーマンスモジュールからの処理結果をマージし、最終的にはエンドユーザーへ結果を返します。

ユーザーモジュールはいくつかのプロセスで構成されます。

  • MariaDB Serverプロセス:mysqld
    • mysqldはMariaDB ColumnStore用に特別に改修されたMariaDB Serverのバイナリです。
    • 通常のMariaDB Serverのサーバーバイナリと同様の処理(接続、SQLのパース、SQLプランの生成、最終的か結果セットの組み立て)を行います。
    • さらに、MariaDB Serverのクエリ実行計画を、MariaDB ColumnStore形式に変換します。MariaDB ColumnStore実行計画は、基本的には解析木ですが、実行におけるヒントがオプティマイザーより付加され、ユーザーモジュールによる解析木のジョブリストへの変換をサポートします。
  • 実行マネージャー:ExeMgr
    • ExeMgrはmysqldからのクエリー解析木をTCP/IPポートで待ち受けます。ExeMgrは解析木のジョブリストへの変換を受け持っています。ジョブリストはMariaDB ColumnStoreの構成要素であり、クエリに応答する命令の順序が記述されています。ExeMgrは解析木をパースし、ジョブステップをの生成およびジョブリストの最適化を繰り返します。ジョブステップの主な内容は、カラムへのフィルタの適用、結合処理、そして、クエリ結果のプロジェクションです。クエリ実行計画のそれぞれの処理は、ジョブリストによって並列に実行されます。そして、ユーザーモジュールだけもしくはパフォーマンスジュールだけ、またはそれらの組み合わせにより、処理される可能性があります。それぞれののノードは、エクステントマップを用いてどのパフォーマンスモジュールに処理命令を送るかを決定します(ColumnStore Storage Architecture参照)。
  • DML, DDL ,import分配マネージャー (DMLProc, DDLProc, cpimport).
    • DMLProcとDDLProcはDMLとDDLを適切なパフォーマンスモジュールに分配します。ユーザーモジュールでCpimportが動作する際には、ソースファイルをパフォーマンスもっジュールに分配します。

ユーザーモジュールはMariaDB ColumnSstoreの中心となる機能を処理します。

  • MariaDBプランをColumnStoreジョブリストに変換します。

The User Module performs these core functions for MariaDB ColumnStore:

  • Transforms MariaDB plan into a ColumnStore Job List.
  • Performs InfiniDB OID (object ID) lookups from the MariaDB ColumnStore system catalog.
  • Inspects the Extent Map (described in ColumnStore Storage Architecture) to reduce I/O, which is accomplished via the elimination of unnecessary extents.
  • Issues instructions (sometimes referred to as ‘primitive operations’) to the Performance Modules.
  • Executes hash joins as needed (depending on size of smaller tables in the join). Helps manage distributed hash joins by sending any hash maps needing processing to Performance Modules.
  • Executes cross-table-scope functions and expressions that happen after a hash join.
  • Receives data from the Performance Modules and re-transmits back to them if needed.
  • Executes follow-up steps for all aggregation and distinct processing.
  • Returns data back to the MariaDB interface. The primary job of the User Module is to handle concurrency scaling. It never directly touches database files and does not require visibility to them. It uses a machine’s RAM in a transitory manner to assemble partial query results into a complete answer that is ultimately returned to a user.

Comments

Comments loading...
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.