準備†pgbenchを利用 # su postgres $ cd /usr/local/src/postgresql-8.1.2/contrib/pgbench/ $ make $ make install ベンチマーク用データベースを作成し、初期化 $ createdb benchtest $ pgbench -i benchtest ベンチマーク実施†$ pgbench benchtest starting vacuum...end. transaction type: TPC-B (sort of) scaling factor: 1 number of clients: 1 number of transactions per client: 10 number of transactions actually processed: 10/10 tps = 482.741974 (including connections establishing) tps = 545.375218 (excluding connections establishing) デフォルトはクライアント数1、トランザクション数10でSELECT,INSERT,UPDATEが実行される SELECTのみをクライアント数10、トランザクション数100とする場合は $ pgbench -S -c 10 -t 100 benchtest |