2012年5月24日に開催された「第2回『いまさら聞けない!システム運用・管理のコツ』」のセッション「いまさら聞けないPostgreSQL運用管理」の講演資料です。Read less
VP, Chief Database Scientist @ EnterpriseDB, PostgreSQL Major Contributor and Committer The list of new features coming in PostgreSQL 10 is extremely impressive. I've been involved in the PostgreSQL project since the 8.4 release cycle (2008-2009), and I've never seen anything like this. Many people have already blogged about these features elsewhere; my purpose here is just to bring together a l
This week at RailsConf, we found ourselves sharing a lot of tips for using PostgreSQL with Rails. We thought it might be worthwhile to write up many of these and share more broadly. Here you’ll find some tips that will help you in debugging and improving performance of your database from your Rails app. And now, on to the code. Manage long running queries with statement time-outs Long running quer
こんにちは、hachi8833です。今回は「A Rubyist's Guide to Postgresql's Explain」の翻訳記事をお届けいたします。 EXPLAINはSQLの構文なので、本記事では元記事のタイトルとコードを除き大文字で表記します。 概要 原著者の許諾を得て翻訳・公開いたします。 元記事: A Rubyist's Guide to Postgresql's Explain 原著者: Starr Horne 元サイト: RubyLetter -- 週一ペースで多くの良記事が公開されています。おすすめです。 なお、翻訳では元記事にないコードのハイライトをスクリーンショットとして追加しています。 PostgreSQLにはEXPLAINと呼ばれるささやかな機能があります。ささやかですが、「このところなぜかデータベースクエリが遅い」という問題を解決するうえで最強の武器にもなり
こんにちは。ソリューションアーキテクトの江川(@daiti0804)です。本日は、AWS のソリューションアーキテクトである Steve Abraham が、AWS Database Blogに投稿したIntroducing the Aurora Storage Engine をご紹介します。 Amazon Aurora とは? Amazon Aurora は、MySQL と互換性のあるリレーショナルデータベースエンジンで、高性能な商用データベースの可用性とスピード、およびオープンソースデータベースのシンプルさとコスト効果性を併せ持っています。Amazon Aurora は、MySQL よりも最大 5 倍のパフォーマンスを発揮するだけでなく、商用データベースが持つようなセキュリティ、可用性、および信頼性を 10 分の 1 のコストで実現します。また、PostgreSQL と互換性のある A
データインテグレーション部 大矢です。 DBのテストデータをExcelで書くことはよくあると思います。 今回はExcelで書いたデータをEmbulkでDBにロードする、ということをやってみようと思います。 使用した環境は以下のとおりです。 Embulk v0.8.13 Digdag v0.8.16 PostgreSQL 9.5.3 Mac OS X El Capitan version 10.11.6 ExcelのデータをPostgreSQLにロードする 作業ディレクトリ 先に今回の作業で使用するディレクトリ構成を示しておきます。最終的にはこうなります。 excelload ├── allsheet.dig └── embulk ├── sales.yml ├── testdata.xlsx └── users.yml Excelのテストデータ ロードするデータ Excelのテストデータシ
NTT オープンソースソフトウェアセンタ 笠原 辰仁 はじめに PostgreSQLのcontribモジュールの一つに、pgcryptoというものがあります。pgcryptoは、その名の通り暗号化をサポートするツールです。主にはDB内のデータの暗号化を実施したい場合に使われます。オンラインマニュアルに詳しい機能の解説や参考文献へのリンクが載っています。本記事では、pgcryptoの簡単な使い方と、pgcryptoを使う際に有用なテクニックを紹介します。 暗号化について 昨今では、個人情報保護法に備えるため、暗号化を必要とするケースが増えてきました。特にデータベースには重要な個人情報が格納されるため、特にシビアな暗号化を検討されることが多いです。 一口に暗号化と言っても、ストレージのハードウェア部分で暗号化を施す、ファイルシステム(ブロックデバイス)で暗号化を施す、盗聴に備えて暗号化したデー
PostgreSQLの基本的な使い方と初期設定メモ。 ■PostgreSQLのインストール Ubuntu7.10にインストールする。 だけで以下のように依存パッケージを自動でインストールしてくれます。 postgresqlのインストール $ sudo apt-get install postgresql パッケージリストを読み込んでいます... 完了 依存関係ツリーを作成しています Reading state information... 完了 以下の特別パッケージがインストールされます: libpq5 postgresql-8.2 postgresql-client-8.2 postgresql-client-common postgresql-common ■PostgreSQLのユーザ管理 PostgreSQLはLinuxのアカウントとは別にデータベースユーザを管理している。デフォル
はてなグループの終了日を2020年1月31日(金)に決定しました 以下のエントリの通り、今年末を目処にはてなグループを終了予定である旨をお知らせしておりました。 2019年末を目処に、はてなグループの提供を終了する予定です - はてなグループ日記 このたび、正式に終了日を決定いたしましたので、以下の通りご確認ください。 終了日: 2020年1月31日(金) エクスポート希望申請期限:2020年1月31日(金) 終了日以降は、はてなグループの閲覧および投稿は行えません。日記のエクスポートが必要な方は以下の記事にしたがって手続きをしてください。 はてなグループに投稿された日記データのエクスポートについて - はてなグループ日記 ご利用のみなさまにはご迷惑をおかけいたしますが、どうぞよろしくお願いいたします。 2020-06-25 追記 はてなグループ日記のエクスポートデータは2020年2月28
利用規約を守って投稿してください。また、よくある質問および投稿の手引きも参照してください。 メッセージの投稿にはアカウントが必要です。未登録の方は、ユーザ登録ページからアカウントを作成することができます。 インストール Synapticでpostgresql、pgadmin3をインストール PostgreSQLでは、OSのユーザとデータベースユーザとは独立している。 インストールした直後の状態はOSのユーザとしてのpostgres(このままではログインできない) とデータベースユーザとしてのpostgresがあるのみ psqlでの初期設定 PostgreSQLにログインするためLinuxユーザとしてのpostgresのパスワードを設定する。 $ sudo passwd postgres Linuxユーザとしてのpostgresでログイン $ su postgres この時点でシェルから $
NTT オープンソースソフトウェアセンタ 鈴木 幸市 4. 設定 設定で行うことは次のとおりです。 管理ユーザ(postgres) でログインできるようにする。 管理ユーザでログインしてデータベースを作る データベースに自分のアカウントでログインできるように設定する。 では、順を追ってやり方を示していきます。 4.1 管理ユーザでログインできるようにする PostgreSQLをインストールした時点で、すでにデータベースの管理ユーザであるpostgresユーザが作られています。しかし、このユーザのパスワードは不定で、このままではログインができません。最初にデータベースを作ったりデータベースのユーザを設定するためには、postgresユーザにならなければなりません。そこで、postgresユーザログインできるようにパスワードを設定しましょう。 パスワードの設定には、「端末」を使います。これは、
NTT オープンソースソフトウェアセンタ 板垣 貴裕 スロークエリ (時間のかかるSQL) を発見するまでの手順を解説します。スロークエリ分析と改善は以下の流れで行うことになります。この記事では主に 1. のスロークエリの特定方法について解説します。2.については『スロークエリの改善』を参考にしてください。 どのSQLが遅いのかを見つける。 そのSQLがなぜ時間がかかるのかを判断する。 設定パラメータ、SQL、スキーマなどを改善する。 着目したSQLの性能を再測定し、2. から繰り返す。 着目したSQLのチューニングが完了したら、他のボトルネックを探すため 1. から繰り返す。 スロークエリの見つけ方 スロークエリを見つけるには、大きく分けて統計情報ビューを使う方法と、サーバログを使う方法の2つがあります。統計情報ビューを使う方法は PostgreSQL 8.4 以降でしか利用できませんが
せっかくMySQLに全文検索エンジンを追加したのだけれども会社ではPostgreSQLを使うもんだからそっちの扱いのほうが慣れてしまった。 というわけでPostgreSQLにも全文検索エンジンを追加してみることに。 調べてみるとMySQLのようにソースから設定する必要がないので結構楽っぽい。 【前提】 OS:CentOS4.4 PostgreSQL:8.1.8 Senna:1.0.3インストール済 MeCab:0.95インストール済 【PostgreSQLインストール】 PostgreSQLのインストール #yum install postgresql-server 自分のCentOSはcentosplusレポジトリを有効にしているのでPostgreSQLのバージョンは8.1.8になった。 PostgreSQLを起動 #/etc/init.d/postgresql start この時点でp
NTT オープンソースソフトウェアセンタ 笠原 辰仁 この記事は、gihyo.jp & Let's Postgres 連動企画「今こそ!PostgreSQL」の第6回記事です。第6回目は、PostgreSQLのエラーメッセージや内部情報を見て、発生している問題の特定とその対策となるチューニングを紹介します。なお、トラブルの発生・予兆を適切に捕捉するためにも、ログの設定や稼動統計情報の監視をしておきましょう。 エラーメッセージについて トラブルと対策の前にエラーメッセージのレベルについて説明しておきます。PostgreSQLは複数のエラーレベルを影響範囲や深刻度によって使い分けています。エラーレベルそれぞれの解釈の仕方を下記の表にまとめてみました。 データベース管理者は、深刻な状況である PANIC と、性能情報を含む LOG レベルのメッセージに注意しましょう。一方、アプリケーション開発者
作者 Greg Smith、Robert Treat、およびChristopher Browne PostgreSQLは性能よりも幅広い互換性を目的に設定された、基本設定で配布されています。 デフォルトのパラメータでは、使用中のシステムを過小評価してしまう可能性が高いです。 最終的に把握しなければならない項目のすべて(必要ならばGUC Three Hour Tourを参照してください)に引きずり込まれないように、ここで基本を簡単に紹介することでお助けしようと思います。 これらはPostgreSQLの初心者は気にしない、もっとも一般的なもののようです。 ここで紹介した概要を読んだ後により詳しく知りたければ、各節にてパラメータの名前をクリックしてください。 最新のPostgreSQLのマニュアルの関連文書にリンクしています。 さらにServer Configuration Tuningには、こ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く