Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitee78b34

Browse files
committed
documentations updated
1 parent58e6a23 commitee78b34

File tree

2 files changed

+22
-15
lines changed

2 files changed

+22
-15
lines changed

‎README.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ Partitioning refers to splitting one large table into smaller pieces. Each row i
1313
PostgreSQL supports partitioning via table inheritance. Each partition must be created as child table with CHECK CONSTRAINT. For example:
1414

1515
```
16-
CHECK ( id >= 100 AND id < 200 )
17-
CHECK ( id >= 200 AND id < 300 )
16+
CREATE TABLE test (id SERIAL PRIMARY KEY, title TEXT);
17+
CREATE TABLE test_1 (CHECK ( id >= 100 AND id < 200 )) INHERITS (test);
18+
CREATE TABLE test_2 (CHECK ( id >= 200 AND id < 300 )) INHERITS (test);
1819
```
1920

2021
Despite the flexibility of this approach it has weakness. If query uses filtering the optimizer forced to perform an exhaustive search and check constraints for each partition to determine partitions from which it should select data. If the number of partitions is large the overhead may be significant.
@@ -34,16 +35,19 @@ Based on partitioning type and operator the `pathman` searches corresponding par
3435

3536
##Installation
3637

37-
To install pathman run inpsql:
38+
To install pathman run inpathman directory:
3839
```
39-
CREATE SCHEMA pathman;
40-
CREATE EXTENSION pathman SCHEMA pathman;
40+
make install
4141
```
42-
Then modify shared_preload_libraries parameter in postgres.conf as following:
42+
Modify shared_preload_libraries parameter in postgres.conf as following:
4343
```
4444
shared_preload_libraries = 'pathman'
4545
```
46-
It will require to restart the PostgreSQL instance.
46+
It will require to restart the PostgreSQL instance. Then execute following query in psql:
47+
```
48+
CREATE SCHEMA pathman;
49+
CREATE EXTENSION pathman SCHEMA pathman;
50+
```
4751

4852
##Pathman Functions
4953

‎README.rus.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
Секционирование в postgres основано на механизме наследования. Каждому наследнику задается условие CHECK CONSTRAINT. Например:
1414

1515
```
16-
CHECK ( id >= 100 AND id < 200 )
17-
CHECK ( id >= 200 AND id < 300 )
16+
CREATE TABLE test (id SERIAL PRIMARY KEY, title TEXT);
17+
CREATE TABLE test_1 (CHECK ( id >= 100 AND id < 200 )) INHERITS (test);
18+
CREATE TABLE test_2 (CHECK ( id >= 200 AND id < 300 )) INHERITS (test);
1819
```
1920

2021
Несмотря на гибкость, этот механизм обладает недостатками. Так при фильтрации данных оптимизатор вынужден перебирать все дочерние секции и сравнивать условие запроса с CHECK CONSTRAINT-ами секции, чтобы определить из каких секций ему следует загружать данные. При большом количестве секций это создает дополнительные накладные расходы, которые могут свести на нет выигрыш в производительности от применения секционирования.
@@ -35,17 +36,19 @@ WHERE id = 150
3536

3637
##Installation
3738

38-
Для установки pathman выполните вкомандной строке:
39+
Для установки pathman выполните вдиректории модуля команду:
3940
```
40-
CREATE SCHEMA pathman;
41-
CREATE EXTENSION pathman SCHEMA pathman;
42-
41+
make install
4342
```
44-
Затем модифицируйте параметр shared_preload_libraries в конфигурационном файле postgres.conf:
43+
Модифицируйте параметр shared_preload_libraries в конфигурационном файле postgres.conf:
4544
```
4645
shared_preload_libraries = 'pathman'
4746
```
48-
Для вступления изменений в силу потребуется перезагрузка сервера PostgreSQL.
47+
Для вступления изменений в силу потребуется перезагрузка сервера PostgreSQL. Затем выполните в psql:
48+
```
49+
CREATE SCHEMA pathman;
50+
CREATE EXTENSION pathman SCHEMA pathman;
51+
```
4952

5053
##Функции pathman
5154

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp