You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
Перенсем данные из родительской таблицы в дочерние секции.
118
+
This will create new partitions but data will still be in the parent table. To move data to the corresponding partitions use partition_data() function:
107
119
```
108
120
SELECT partition_data('hash_rel');
109
121
```
110
122
###RANGE
111
-
Пример секционирования таблицы с использованием стратегииRANGE.
123
+
Consider an example ofRANGE partitioning. Create a table with numerical or date or timestamp column:
112
124
```
113
125
CREATE TABLE range_rel (
114
126
id SERIAL PRIMARY KEY,
115
127
dt TIMESTAMP);
116
128
INSERT INTO range_rel (dt) SELECT g FROM generate_series('2010-01-01'::date, '2015-12-31'::date, '1 day') as g;
117
129
```
118
-
Разобьем таблицу на 60 секций так, чтобы каждая секция содержала данные за один месяц:
130
+
Run create_range_partitions() function to create partitions so that each partition would contain data for one month: