|
1 |
| -<?xml version="1.0" encoding="UTF-8"?> |
2 |
| -<!DOCTYPE html |
3 |
| - PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
4 |
| - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
5 |
| - |
6 |
| -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> |
7 |
| - <head> |
8 |
| - <link rel="icon" type="image/png" href="http://pgfoundry.org/images/elephant-icon.png" /> |
9 |
| - <link rel="stylesheet" type="text/css" href="style.css" /> |
10 |
| - <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
11 |
| - <title>pg_reorg: Project Home Page</title> |
12 |
| -</head> |
13 |
| - |
14 |
| -<body> |
15 |
| -<center><img style="border: none; margin-left: auto; margin-right: auto; " src="http://pgfoundry.org/images/elephantSmall.png" height="75" width="75" /> |
16 |
| -<hr /> |
17 |
| -<h1>pg_reorg ホームページへようこそ</h1> |
18 |
| -<hr /> |
19 |
| -</center> |
20 |
| -<p> |
21 |
| -pg_reorg は PostgreSQL のテーブルを再編成するシェルコマンドです。 |
22 |
| -共有ロックや排他ロックを取得しないため、再編成中であっても行の参照や更新を行うことができます。 |
23 |
| -このモジュールは CLUSTER や VACUUM FULL コマンドのより良い代替になります。 |
24 |
| -</p> |
25 |
| -<p>この pg_reorg プロジェクトは <a href="http://www.postgresql.org">PostgreSQL</a> コミュニティによる <a href="http://pgfoundry.org">pgFoundry</a> の中の<a href="http://pgfoundry.org/projects/reorg">プロジェクト</a>です。</p> |
26 |
| -<ul> |
27 |
| - <li><a href="http://pgfoundry.org/frs/?group_id=1000411">ダウンロード</a> : ソースコードのほか、Windows 用バイナリもダウンロードできます。</li> |
28 |
| - <li><a href="http://pgfoundry.org/tracker/?group_id=1000411">バグレポート</li></li> |
29 |
| - <li><a href="http://pgfoundry.org/mail/?group_id=1000411">メーリングリスト</a> への参加</li> |
30 |
| -</ul> |
31 |
| -<div> |
32 |
| -<a href="index.html">Here is an English page.</a> |
33 |
| -</div> |
34 |
| -<hr /> |
35 |
| - |
36 |
| -<p> |
37 |
| -<a href="pg_reorg-ja.html">ドキュメントはこちら</a>。 |
38 |
| -</p> |
39 |
| - |
40 |
| -<hr /> |
41 |
| -<div align="right"> |
42 |
| -Copyright (c) 2008-2009, NIPPON TELEGRAPH AND TELEPHONE CORPORATION |
43 |
| -</div> |
44 |
| - |
45 |
| -<!-- PLEASE LEAVE "Powered By GForge" on your site --> |
46 |
| -<br /> |
47 |
| -<center> |
48 |
| -<a href="http://gforge.org/"><img src="http://gforge.org/images/pow-gforge.png" |
49 |
| -alt="Powered By GForge Collaborative Development Environment" border="0" /></a> |
50 |
| -</center> |
51 |
| - |
52 |
| -</body> |
53 |
| -</html> |
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<!DOCTYPE html |
| 3 | + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" |
| 4 | + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 5 | + |
| 6 | +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ja" lang="ja"> |
| 7 | + <head> |
| 8 | + <link rel="icon" type="image/png" href="http://pgfoundry.org/images/elephant-icon.png" /> |
| 9 | + <link rel="stylesheet" type="text/css" href="style.css" /> |
| 10 | + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 11 | + <title>pg_reorg: Project Home Page</title> |
| 12 | +</head> |
| 13 | + |
| 14 | +<body> |
| 15 | +<center><img style="border: none; margin-left: auto; margin-right: auto; " src="http://pgfoundry.org/images/elephantSmall.png" height="75" width="75" /> |
| 16 | +<hr /> |
| 17 | +<h1>pg_reorg ホームページへようこそ</h1> |
| 18 | +<hr /> |
| 19 | +</center> |
| 20 | +<p> |
| 21 | +pg_reorg は PostgreSQL のテーブルを再編成するシェルコマンドです。 |
| 22 | +共有ロックや排他ロックを取得しないため、再編成中であっても行の参照や更新を行うことができます。 |
| 23 | +このモジュールは CLUSTER や VACUUM FULL コマンドのより良い代替になります。 |
| 24 | +</p> |
| 25 | +<p>この pg_reorg プロジェクトは <a href="http://www.postgresql.org">PostgreSQL</a> コミュニティによる <a href="http://pgfoundry.org">pgFoundry</a> の中の<a href="http://pgfoundry.org/projects/reorg">プロジェクト</a>です。</p> |
| 26 | +<ul> |
| 27 | + <li><a href="http://pgfoundry.org/frs/?group_id=1000411">ダウンロード</a> : ソースコードのほか、Windows 用バイナリもダウンロードできます。</li> |
| 28 | + <li><a href="http://pgfoundry.org/tracker/?group_id=1000411">バグレポート</li></li> |
| 29 | + <li><a href="http://pgfoundry.org/mail/?group_id=1000411">メーリングリスト</a> への参加</li> |
| 30 | +</ul> |
| 31 | +<div> |
| 32 | +<a href="index.html">Here is an English page.</a> |
| 33 | +</div> |
| 34 | +<hr /> |
| 35 | + |
| 36 | +<h2>ドキュメント</h2> |
| 37 | +<p> |
| 38 | +<a href="pg_reorg-ja.html">ドキュメントはこちら</a>。 |
| 39 | +</p> |
| 40 | + |
| 41 | +<h2>実行時間</h2> |
| 42 | +<p> |
| 43 | +pg_reorg とclusterdb の比較に示します。 |
| 44 | +断片化のないソートされた状態 (not fragmented) では clusterdb のほうが高速ですが、完全に断片化した状態 (fully fragmented) では pg_reorg が大幅に高速です。 |
| 45 | +一般的に、再編成は断片化が進行した状態で実施されることを考えると、pg_reorg は clusterdb よりも実行時間が短いと言えます。 |
| 46 | +</p> |
| 47 | + |
| 48 | +<center> |
| 49 | +<div style="margin: 2em"> |
| 50 | +<img src="result.png" /> |
| 51 | +</div> |
| 52 | + |
| 53 | +<table border="1"> |
| 54 | +<caption>測定環境</caption> |
| 55 | +<tr> |
| 56 | + <th>大項目</th> |
| 57 | + <th>小項目</th> |
| 58 | + <th>環境</th> |
| 59 | +</tr> |
| 60 | +<tr> |
| 61 | + <td rowspan="3">ハードウェア</td> |
| 62 | + <td>CPU</td> |
| 63 | + <td>2 × Xeon 5160 3.00GHz (Dual core)</td> |
| 64 | +</tr> |
| 65 | +<tr> |
| 66 | + <td>メモリ</td> |
| 67 | + <td>2GB</td> |
| 68 | +</tr> |
| 69 | +<tr> |
| 70 | + <td>ストレージ</td> |
| 71 | + <td>Ultra320 SCSI, 15000rpm (220GB)</td> |
| 72 | +</tr> |
| 73 | +<tr> |
| 74 | + <td rowspan="4">ソフトウェア</td> |
| 75 | + <td>OS</td> |
| 76 | + <td>RHEL 5.2 (64bit) 2.6.18-92.el5</td> |
| 77 | +</tr> |
| 78 | +<tr> |
| 79 | + <td>DB</td> |
| 80 | + <td>PostgreSQL 8.3.3</td> |
| 81 | +</tr> |
| 82 | +<tr> |
| 83 | + <td>pg_reorg</td> |
| 84 | + <td>1.0.0</td> |
| 85 | +</tr> |
| 86 | +<tr> |
| 87 | + <td>clusterdb</td> |
| 88 | + <td>clusterdb (PostgreSQL) 8.3.3</td> |
| 89 | +</tr> |
| 90 | +<tr> |
| 91 | + <td rowspan="2">データ</td> |
| 92 | + <td>スキーマ</td> |
| 93 | + <td><code><pre>CREATE TABLE tbl ( |
| 94 | + id bigserial PRIMARY KEY, |
| 95 | + seqkey timestamp NOT NULL, |
| 96 | + rndkey timestamp NOT NULL, |
| 97 | + filler char(75) NOT NULL |
| 98 | +); |
| 99 | +CREATE INDEX idx_seq ON tbl (seqkey); |
| 100 | +CREATE INDEX idx_rnd ON tbl (rndkey);</pre></code></td> |
| 101 | +</tr> |
| 102 | +<tr> |
| 103 | + <td>件数</td> |
| 104 | + <td>1650万件 (約2GB)</td> |
| 105 | +</tr> |
| 106 | +</table> |
| 107 | + |
| 108 | +</center> |
| 109 | + |
| 110 | +<hr /> |
| 111 | +<div align="right"> |
| 112 | +Copyright (c) 2008-2009, NIPPON TELEGRAPH AND TELEPHONE CORPORATION |
| 113 | +</div> |
| 114 | + |
| 115 | +<!-- PLEASE LEAVE "Powered By GForge" on your site --> |
| 116 | +<br /> |
| 117 | +<center> |
| 118 | +<a href="http://gforge.org/"><img src="http://gforge.org/images/pow-gforge.png" |
| 119 | +alt="Powered By GForge Collaborative Development Environment" border="0" /></a> |
| 120 | +</center> |
| 121 | + |
| 122 | +</body> |
| 123 | +</html> |
0 commit comments