目次
Database Designerとは?
Verticaはテーブル作成後にデータをロードした状態でも、列指向やデータ圧縮の恩恵を受けることが可能なため、高速なパフォーマンスを得ることができます。しかし、プロジェクションを最適化することで更なるパフォーマンスの向上を期待できます。プロジェクションの最適化はDatabase Designerで行います。Database Designerを実行するには、以下2種類の方法があります。
・CUIベースのadmintoolsを利用する方法
・GUIベースのManagement Consoleを利用する方法
この記事ではadmintoolsを利用したデータベースデザイナの実行手順をご紹介します。
※Management Consoleを利用する方法はこちらから。
https://vertica-tech.ashisuto.co.jp/execute-database-designer-using-management-console
admintoolsを起動
admintoolsはVerticaがインストールされている何れかのノードで以下のコマンドを実行し起動します。
1 2 |
[root@]# su - dbadmin [dbadmin@]$ /opt/vertica/bin/admintools |
※通常はVerticaのインストール時に適切なPATHが自動で設定されるため、admintoolsと入力するだけでも起動できます。
データベースデザイナの実行
「6.Configuration Menu」を選択します。
「2.Run Database Designer」を選択してデータベースデザイナ実行ステップに入ります。

対象データベースの選択
対象とするデータベースを指定します。今回の例ではtestdbデータベースを指定します。

パスワードの入力
選択したデータベースに接続するためパスワードを入力します。
データベースデザイナのファイル群の出力先
データベースデザイナ実行時のファイル出力ディレクトリを指定します。
デザイナ名の指定
データベースデザイナの名称を指定します。
デザインタイプの指定
デザインタイプを選択します。Comprehensive・・・データベース全体に対してデータベースデザイナを実行するモード
Incremental・・・・SQL単位でデータベースデザイナを実行するモード
Incremental・・・・SQL単位でデータベースデザイナを実行するモード
ここではデータベース全体に実施するComprehensiveモードを例に説明していきます。

対象スキーマの選択
データベースデザイナを実行する対象スキーマを選択します。
オプションの選択
必要に応じてオプションを指定します。デフォルトでは全て実行する設定になっています。Optimize with queries・・・クエリを最適化するオプション
Update statistics・・・統計情報を更新するオプション
Deploy design・・・デザインをデプロイするオプション
Update statistics・・・統計情報を更新するオプション
Deploy design・・・デザインをデプロイするオプション
ここでは、デフォルトの設定として次の手順に進みます。

K-safetyの設定
K-safetyの数を指定し、バディプロジェクションの数を決定します。K-safetyの詳細については以下の記事をご参照ください。
Verticaの可用性機能
https://vertica-tech.ashisuto.co.jp/data_fault_tolerant/
サンプルファイルの指定
DBD実行にあたり、サンプルのクエリファイルを指定します。
最適化モードの選択
どのように最適化するのかを指定します。Balance query/load performance・・・queryとloadパフォーマンスを最適化
Query performance(larger footprint)・・・クエリ処理を最適化
Load performance(smaller footprint)・・・ロード処理を最適化
Query performance(larger footprint)・・・クエリ処理を最適化
Load performance(smaller footprint)・・・ロード処理を最適化
ここでは「Balance query/load performance」を選択します。

実行確認
確認メッセージを参照し、問題なければ「Proceed」を選択して実行します。
データベースデザイナ実行時のメッセージ
データベースデザイナの処理が開始されると、以下の様なメッセージが出力されます。正常に終了したか確認をします。
Database Designer started.
For large databases a design session could take a long time; allow it to complete uninterrupted.
Use Ctrl+C if you must cancel the session.
Setting up design session…
Examining table data…
Loading queries from ‘/opt/vertica/examples/scripts/ssbm/1.sql’.
Processed 1 SQL statement(s), all accepted and considered in the design.
Creating design and deploying projections…
[100%] Design in progress… Completed of .
Query optimization results…ress…
Query 1 optimization ratio or status is 1
Deploying and generating deployment script…
[100%] Deploying/Dropping projections… Completed 16 of 16 projections.
Completed 16 of 16 projections.
Design script is located in /opt/vertica/examples/scripts/Query1/Query1_design.sql
Deployment script is located in /opt/vertica/examples/scripts/Query1/Query1_deploy.sql
Database Designer finished.
Press <Enter> to return to the Administration Tools menu.
参考情報
ManagementConsoleを利用したデータベースデザイナの実行手順https://vertica-tech.ashisuto.co.jp/execute-database-designer-using-management-console
検証バージョンについて
この記事の内容はVertica 24.3で確認しています。更新履歴
2024/10/25 admintools の起動コマンドを追加2015/04/23 本記事を公開
- 投稿タグ
- admintools, データベースデザイナ