Skip to main content
友田 陽大

Category

PostgreSQL 本体・性能設計(パフォーマンスチューニング/インデックス/EXPLAIN/MVCC・VACUUM/JSONB/パーティショニング)の実装ガイド

PostgreSQLの性能は『推測』ではなく『計測 → 正しい順の最適化』で決まります。本クラスタは、pg_stat_statementsとEXPLAIN ANALYZEで重いクエリを特定する計測起点から、適切な型・列順のインデックス設計、実行計画の読解とスロークエリ改善、MVCCが生む肥大化とVACUUM/autovacuumの調整、半構造データを載せるJSONBの索引設計、超大規模表を物理分割するパーティショニングまでを、効く順に体系化します。PostgreSQL 16を中核にマルチテナント・多段商流のB2B SaaSを本番運用した知見を根拠に、専用DBを増やさず本番の要求に応える設計を、PostgreSQL 18公式ドキュメントに忠実な実コードで解説します。バックアップ・レプリケーション・接続プーリング・無停止アップグレード等の本番運用は『PostgreSQL 運用・信頼性』クラスタに、RLS(行レベルセキュリティ)やSupabase・Drizzleに特化した設計は『データベース・RLS』クラスタにまとめています。

6 articles in total

Foundational guide

Foundational guide (start here)

PostgreSQL
パフォーマンス
アーキテクチャ設計

PostgreSQL production performance-tuning overview (v18 support): speed it up in the correct order of measure → index → execution plan → memory → VACUUM

A systematic guide to making PostgreSQL fast in production. Faithful to the official documentation (v18), with real code it explains measurement starting with pg_stat_statements, how to read the execution plan with EXPLAIN, the meaning of memory settings like shared_buffers/work_mem, MVCC/VACUUM and indexes, connection pooling, and PostgreSQL 18's asynchronous I/O and B-tree skip scan.

14 min read

Related practical articles