テーブルパーティションの性能改善事例集

DB

事例: 4億行のテーブルに対してselectクエリ実行した場合

4億行で比較したところ、7秒かかるクエリが1秒まで短縮された

事例: 20億行のテーブルに対して、selectを実行した場合

20億行のテーブルに対して、selectを実行した場合、パーティションがある場合はない場合に比べて半分の速度でクエリ成功した。

Search on specified date “2008-08-01”
Records Retrieved = 741825
Partition Table = 359.61 seconds
Non Partition Table = 879.062 seconds

Performance Testing on Partition Table In PostgreSQL - Part 3 - Mkyong.com
- Performance Testing on Partition Table In PostgreSQL - Part 3

事例: 1000万行のテーブルに対して、select/update/insertした場合

1000万行のテーブルに対して、select/update/insertした場合、通常のテーブル・インデックス付き・パーティション付きテーブルのそれぞれでクエリの実行速度を検証

Partitioning Database - A Divide and Rule Strategy | Talentica.com
Click here to find out about Partitioning Database using a Divide and Rule Strategy. Learn more about the process of par...

事例: 2億行のテーブルにinsert文を実行した場合

秒間の挿入量はパーティション化されたテーブルでは一定だが、そうでないものは1/2程度にパフォーマンスが落ちていく

Speed up time series data ingestion by partitioning tables on Amazon RDS for PostgreSQL | Amazon Web Services
In the post Designing high-performance time series data tables on Amazon RDS for PostgreSQL, we explained how to use par...

補足: インデックスのメンテナンスはパーティションごとに可能

indexのメンテナンスはパーティションごとに行われる

Table Partitioning in SQL Server: A Magic Solution for Better Performance? (Pragmatic Works)
Table Partitioning in SQL Server: A Magic Solution for Better Performance? (Pragmatic Works) - Download as a PDF or view...

タイトルとURLをコピーしました