Skip to content

Commit 4061a05

Browse files
author
Masahiro Ikeda
committed
Add notes to import stats to different major versions.
1 parent e041b7c commit 4061a05

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

doc/pg_dbms_stats-en.md

+2
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,8 @@ CAVEAT: The base script uses binary format of COPY command so import
317317
might fail if the format is incompatible with the export side. See [COPY
318318
command](http://www.postgresql.jp/document/current/html/sql-copy.html) for details.
319319

320+
If the major version of the PostgreSQL you are importing to is different, a beneficial execution plan may not necessarily be generated with the statistics from the export side. Therefore, do not import the statistics and create it anew.
321+
320322
## RESTRICTIONS
321323

322324
There are some important poins and restrictions to use pg_dbms_stats.

doc/pg_dbms_stats-ja.md

+2
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,8 @@ backup_xxx() と restore_xxx() 関数を使用します。
324324

325325
また、エクスポートファイルにはCOPYのバイナリフォーマットを利用しているため、エクスポート元とインポート先でアーキテクチャやPostgreSQLバージョンに差がある場合は正常に動作しない場合があります。詳しくは、[COPYコマンドのドキュメント](http://www.postgresql.jp/document/current/html/sql-copy.html)を参照して下さい。
326326

327+
インポート先のPostgreSQLのメジャーバージョンが異なる場合は、エクスポート元の統計情報で有利な実行計画が生成されるとは限らないため、統計情報はインポートせず、新たに作成してください。
328+
327329
## 使用上の注意と制約
328330

329331
pg_dbms_stats を使用する際には、以下の使用上の注意と制約があります。

0 commit comments

Comments
 (0)