※当サイトの記事には、広告・プロモーションが含まれます。

VerticaのSEARCH_PATHが便利かも知らんが、初見だと存在が分かり辛い

nazology.net

ハーバード大学T.H.チャン公衆衛生大学院のジャスティン・ヤング氏(Justin Yang)らの研究チームは、参加者を10年間に渡って追跡し、腕立て伏せが連続でできる回数と心血管疾患の発症の関連性を調べました。

「10回以下はヤバい?」腕立て伏せの回数で10年後の心血管疾患リスクがわかる - ナゾロジー

分析の結果、腕立て伏せが連続で41回以上できた人は、10回しかできなかった人と比較して、心血管疾患のリスクが約96%低下することが確認されたのです。

「10回以下はヤバい?」腕立て伏せの回数で10年後の心血管疾患リスクがわかる - ナゾロジー

また腕立て伏せが連続でできた回数の方が、心肺機能の高さよりも心疾患のリスクとの相関が高いこともわかっています。

「10回以下はヤバい?」腕立て伏せの回数で10年後の心血管疾患リスクがわかる - ナゾロジー

研究チームは「私たちの発見は、腕立て伏せの回数が心血管疾患のリスクを評価するのに役立つ、簡単でお金のかからない方法である可能性を示唆している。」と述べています。

「10回以下はヤバい?」腕立て伏せの回数で10年後の心血管疾患リスクがわかる - ナゾロジー

⇧ う~む、腕立て伏せ以外の要因が影響したかもしれない可能性をどのように排除できたのか興味深いですな。

そして、簡単でお金がかからない方法というけれど、時間はかかると思うんだが...

時は金なり、って言葉もありますしな...

情報に躍らされてることになるかもしれませんが、久々に、腕立て伏せをするようにしますかな。

Verticaとは?

Wikipediaさんによりますと、

Vertica is an analytic database management software company. Vertica was founded in 2005 by the database researcher Michael Stonebraker with Andrew Palmer as the founding CEO. Ralph Breslauer and Christopher P. Lynch served as CEOs later on.

https://en.wikipedia.org/wiki/Vertica

Products

The column-oriented Vertica Analytics Database was designed to manage large, fast-growing volumes of data and with fast query performance for data warehouses and other query-intensive applications. The product claims to greatly improve query performance over traditional relational database systems, and to provide high availability and exabyte scalability on commodity enterprise servers. Vertica runs on multiple cloud computing systems as well as on Hadoop nodes. Vertica's Eon Mode separates compute from storage, using S3 object storage and dynamic allocation of compute notes.

https://en.wikipedia.org/wiki/Vertica

⇧ 会社の名前と製品の名前が一緒で紛らわしいんだけど、データベースってことですかね。

ドキュメントによると、

docs.vertica.com

Architecture

Understanding how Vertica works helps you effectively design, build, operate, and maintain a Vertica database. This section assumes that you are familiar with the basic concepts and terminology of relational database management systems and SQL.

https://docs.vertica.com/24.1.x/en/architecture/

Column Storage

Vertica stores data in a column format so it can be queried for best performance. Compared to row-based storage, column storage reduces disk I/O, making it ideal for read-intensive workloads. Vertica reads only the columns needed to answer the query. Columns are encoded and compressed to further improve performance.

https://docs.vertica.com/24.1.x/en/architecture/

⇧ とあり、参照系の処理で高性能を発揮すると。逆に言うと、データベースへの更新の頻度が高いようなアプリケーションで利用するには向いていないってことなんですかね?

で、

Eon and Enterprise Modes

A Vertica database runs in one of two modes: Eon or Enterprise. Both modes can be deployed on-premises or in the cloud. In Eon Mode, compute and storage are separate; the database uses shared communal storage, and you can add or remove nodes or subclusters based on demand. In Enterprise Mode, each database node has a share of the data and queries are distributed to take advantage of data locality. Understanding the differences between these modes is key. See Eon vs. Enterprise Mode.

https://docs.vertica.com/24.1.x/en/architecture/

⇧ 2つのモードがあるらしい。

www.vertica.com

■Enterprise Mode

■Eon Mode

⇧ 上図だと、違いが微妙にイメージし辛いのだが...

ドキュメントによると、

docs.vertica.com

Eon vs. Enterprise Mode

A Vertica database runs in one of two modes: Eon or Enterprise. Both modes can be deployed on-premises or in the cloud. Understanding the difference between these two modes is key. If you are deploying a Vertica database, you must decide which mode to run it in early in your deployment planning. If you are using an already-deployed Vertica database, you should understand how each mode affects loading and querying data.

https://docs.vertica.com/24.1.x/en/architecture/

Vertica databases running in Eon and Enterprise modes store their data differently:

  • Eon Mode databases use communal storage for their data.

  • Enterprise Mode databases store data locally in the file system of nodes that make up the database.

These different storage methods lead to a number of important differences between the two modes.

https://docs.vertica.com/24.1.x/en/architecture/

⇧ とあり、Eon Modeは、永続化する個所が1つに集約されるのに対し、Enterprise Modeは、それぞれのマシン内で永続化されるっぽい。

で、いまいち、Verticaのインストールの仕方がイメージし辛いのだけど、

docs.vertica.com

⇧ ドキュメントによると、マスターノードというものがあるのか分からんのだけど、Vertica自体のインストールは1つのマシンで行えば良いらしく、クラスター構成にするには、ノードの数だけマシンが必要ということらしい。

つまり、仮に10個のノードが必要となったら、10台のマシンを事前に用意しておく必要はあると、ただし、Verticaのインストール作業は1台のマシンだけで行えば良いということらしく、その際に、ノードにしたいマシンのIPアドレスやホスト名を指定してインストールする必要があると。

ちなみに、

docs.vertica.com

⇧ 基本的には、Linux環境でしか利用できないっぽいですな...

docs.vertica.com

End-of-support notices

Vertica no longer supports the following client platforms and server distributions:

https://docs.vertica.com/24.1.x/en/supported-platforms/end-of-support-notices/

⇧ 旧いOSのサポートをバッサリ切り捨てていくスタイルっぽいですな...

一応、

docs.vertica.com

⇧ コンテナ仮想化にも対応しており、

hub.docker.com

⇧ Docker HubでVerticaのDockerイメージが公開されてる模様。

とは言え、大量のデータを扱うとなると、やはり、物理マシンないしは仮想マシンを複数台用意してクラスター構成を取る感じにした方が良いんかね?

VerticaのSEARCH_PATHが便利かも知らんが、初見だと存在が分かり辛い

で、Verticaはユーザーを切り替えてスキーマ毎にテーブルを作成できるようなのだけど、

docs.vertica.com

スキーマを探索する優先順位というのをユーザー毎に設定しておかないといけないという...

Verticaは、テーブル作成時にどのスキーマを使うかを探索しているらしく、優先順位が正しく設定されていないとテーブルの作成で失敗するという...

いや、明示的にスキーマを指定してテーブルを作成するようなDDLSQLにしなくても、Vertica側で自動的に良しなにスキーマを指定した形でテーブルを作成するDDLSQLとして実行してくれるのは非常にありがたいんだけど、この便利機能の存在が分かり辛過ぎる...

ちなみに、

cosol.jp

⇧ 上記サイト様によりますと、主要なRDBMS(Relational DataBase Management System)の中で、PostgreSQLが唯一「search_path」の仕組みを持っているらしい。

へぇ~、知らなかった。

どうりで、Oracle Databaseで聞いたことが無い仕組みだったわけだ。

何と言うか、データベース固有の独自の機能は、初見だと存在を把握し辛いですな...

ちなみに、

github.com

GitHubでいろいろプロジェクトを公開してる模様。

毎度モヤモヤ感が半端ない...

今回はこのへんで。