2.8.7. groongaストレージエンジンのインストール¶
mysqldを起動し、mysqlクライアントで接続して”INSTALL PLUGIN”コマンドでインストールします。
mysql> INSTALL PLUGIN groonga SONAME ‘ha_groonga.so’;
以下のように”SHOW ENGINES”コマンドで”groonga”が表示されればgroongaストレージエンジンのインストールは完了です。
mysql> SHOW ENGINES;
+——————+————-+——————————————————————————————+———————+———+——————+
| Engine | Support | Comment | Transactions | XA | Savepoints |
+——————+————-+——————————————————————————————+———————+———+——————+
| groonga | YES | Fulltext search, column base | NO | NO | NO |
| MRG_MYISAM | YES | Collection of identical MyISAM tables | NO | NO | NO |
| CSV | YES | CSV storage engine | NO | NO | NO |
| MyISAM | DEFAULT | Default engine as of MySQL 3.23 with great performance | NO | NO | NO |
| InnoDB | YES | Supports transactions, row-level locking, and foreign keys | YES | YES | YES |
| MEMORY | YES | Hash based, stored in memory, useful for temporary tables | NO | NO | NO |
+——————+————-+——————————————————————————————+———————+———+——————+
6 rows in set (0.00 sec)続いてUDF(ユーザ定義関数)をインストールします。
INSERTを行った際にgroongaにより割当てられるレコードIDを取得するためのlast_insert_grn_id関数をインストールします。
以下のようにCREATE FUNCTIONを実行します。
mysql> CREATE FUNCTION last_insert_grn_id RETURNS INTEGER soname ‘ha_groonga.so’;
2. インストールガイド — groonga storage engine v0.6 documentation
yumで入れた後の使い方です
