ColumnStoreクロス・エンジン結合の構成

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

MariaDB ColumnStoreは、クエリにおいて、ColumnStoreのテーブルと非ColumnStoreのテーブル(MyISAMのテーブルなど)の結合をサポートします。非ColumnStoreのテーブルは、MariaDB ColumnStoreシステム上に存在してもJDBCをサポートする外部サーバーに存在しても問題ありません。

本機能をサポートするには、Columnstore.XMLの<CrossEngineSupport>にJDBCの情報を記載します。

以下は、結合対象のデータベースがMariaDB ColumnStoreと同じサーバー上に存在する場合のColumnstore.XMLファイルの記述例です。

<CrossEngineSupport>
       <Host>127.0.0.1</Host>
       <Port>3306</Port>
       <User>mydbuser</User>
       <Password>pwd</Password>
</CrossEngineSupport>

この設定変更は、ColumnStore serverが停止中に行われる必要があります。マルチノード環境では、再起動時に変更が各ノードに反映されるので、PM1上でのみ設定変更を行ってください。

トラブルシューティング

ERROR 1815 (HY000): Internal error: IDB-8001: CrossEngineSupport section in Columnstore.xml is not properly configured

  • ColumnStore.xmlが、PM1(パフォーマンスモジュール1)で正しく更新されて、再起動されていることを確認してください。

ERROR 1815 (HY000): Internal error: fatal error in drizzle_con_connect()(23)(23)

  • ColumnStore.xmlのCrossEngineSupportの記載がログイン情報と相違ないことを確認してください。

ERROR 1815 (HY000): Internal error: fatal error executing query in crossengine client lib(17)(17)

  • ログインユーザーが、infinidb_vtableの一時テーブル作成権限をもつことを確認してください。
grant create temporary tables on infinidb_vtable.* to mydbuser@127.0.0.1;
  • ログインユーザーが、クロス・エンジン結合で参照されるテーブルの参照権限をもつことを、各UMから接続し対象テーブルについて以下のように参照してクエリーを実行できることを確認してください。
mcsmysql -u mydbuser -p -h 127.0.0.1 
> use mydb;
> select * from innodb_table limit 10;

メモ

  • クロス・エンジン結合は、結合対象がMyISAMやAriaで、1行以下の行数の場合は実行されません。これは、MariaDBのオプティマイザーがこのケースをスキップしてしまうためです。そのため、MyISAMやAriaの代わりにInnoDBを使うことをお勧めします。

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.