1
################################################################################
2
# inc/partition_alter1.inc #
5
# Execute ALTER ... OPTIMIZE/CHECK/REBUID/ANALYZE statements (maintenance) #
7
#------------------------------------------------------------------------------#
8
# Original Author: HH #
9
# Original Date: 2006-07-27 #
13
################################################################################
16
--echo #========================================================================
17
--echo # 1.1.1.12 ALTER TABLE <maintenance> PARTITION
18
--echo #========================================================================
19
--echo #------------------------------------------------------------------------
20
--echo # 1 ALTER ... ANALYZE PARTITION
21
--echo #------------------------------------------------------------------------
22
--echo # 1.1 ALTER ... ANALYZE PARTITION part_1;
23
let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1;
24
--source suite/parts/inc/partition_alter_41.inc
25
--echo # 1.2 ALTER ... ANALYZE PARTITION part_1,part_2;
26
let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_2;
27
--source suite/parts/inc/partition_alter_41.inc
28
--echo # 1.3 ALTER ... ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
29
let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_2,part_5,part_6,part_10;
30
--source suite/parts/inc/partition_alter_41.inc
31
--echo # 1.4 ALTER ... ANALYZE PARTITION part_1,part_1,part_1;
32
let $alter= ALTER TABLE t1 ANALYZE PARTITION part_1,part_1,part_1;
33
--source suite/parts/inc/partition_alter_41.inc
35
--echo #------------------------------------------------------------------------
36
--echo # 2 ALTER ... CHECK PARTITION
37
--echo #------------------------------------------------------------------------
38
--echo # 2.1 ALTER ... CHECK PARTITION part_1;
39
let $alter= ALTER TABLE t1 CHECK PARTITION part_1;
40
--source suite/parts/inc/partition_alter_41.inc
41
--echo # 2.2 ALTER ... CHECK PARTITION part_1,part_2;
42
let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_2;
43
--source suite/parts/inc/partition_alter_41.inc
44
--echo # 2.3 ALTER ... CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
45
let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_2,part_5,part_6,part_10;
46
--source suite/parts/inc/partition_alter_41.inc
47
--echo # 2.4 ALTER ... CHECK PARTITION part_1,part_1,part_1;
48
let $alter= ALTER TABLE t1 CHECK PARTITION part_1,part_1,part_1;
49
--source suite/parts/inc/partition_alter_41.inc
51
--echo #------------------------------------------------------------------------
52
--echo # 3 ALTER ... OPTIMIZE PARTITION
53
--echo #------------------------------------------------------------------------
54
--echo # 3.1 ALTER ... OPTIMIZE PARTITION part_1;
55
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1;
56
--source suite/parts/inc/partition_alter_41.inc
57
--echo # 3.2 ALTER ... OPTIMIZE PARTITION part_1,part_2;
58
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2;
59
--source suite/parts/inc/partition_alter_41.inc
60
--echo # 3.3 ALTER ... OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
61
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_2,part_5,part_6,part_10;
62
--source suite/parts/inc/partition_alter_41.inc
63
--echo # 3.4 ALTER ... OPTIMIZE PARTITION part_1,part_1,part_1;
64
let $alter= ALTER TABLE t1 OPTIMIZE PARTITION part_1,part_1,part_1;
65
--source suite/parts/inc/partition_alter_41.inc
67
--echo #------------------------------------------------------------------------
68
--echo # 4 ALTER ... REBUILD PARTITION
69
--echo #------------------------------------------------------------------------
70
--echo # 4.1 ALTER ... REBUILD PARTITION part_1;
71
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1;
72
--source suite/parts/inc/partition_alter_41.inc
73
--echo # 4.2 ALTER ... REBUILD PARTITION part_1,part_2;
74
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_2;
75
--source suite/parts/inc/partition_alter_41.inc
76
--echo # 4.3 ALTER ... REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
77
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_2,part_5,part_6,part_10;
78
--source suite/parts/inc/partition_alter_41.inc
79
--echo # 4.4 ALTER ... REBUILD PARTITION part_1,part_1,part_1;
80
let $alter= ALTER TABLE t1 REBUILD PARTITION part_1,part_1,part_1;
81
--source suite/parts/inc/partition_alter_41.inc
83
--echo #------------------------------------------------------------------------
84
--echo # 5 ALTER ... REPAIR PARTITION
85
--echo #------------------------------------------------------------------------
86
--echo # 5.1 ALTER ... REPAIR PARTITION part_1;
87
let $alter= ALTER TABLE t1 REPAIR PARTITION part_1;
88
--source suite/parts/inc/partition_alter_41.inc
89
--echo # 5.2 ALTER ... REPAIR PARTITION part_1,part_2;
90
let $alter= ALTER TABLE t1 REPAIR PARTITION part_1,part_2;
91
--source suite/parts/inc/partition_alter_41.inc
92
--echo # 5.3 ALTER ... REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
93
let $alter= ALTER TABLE t1 REPAIR PARTITION part_1,part_2,part_5,part_6,part_10;
94
--source suite/parts/inc/partition_alter_41.inc
95
--echo # 5.4 ALTER ... REPAIR PARTITION part_1,part_1,part_1;
96
let $alter= ALTER TABLE t1 REPAIR PARTITION part_1,part_1,part_1;
97
--source suite/parts/inc/partition_alter_41.inc
99
--echo #------------------------------------------------------------------------
100
--echo # 6 ALTER ... REMOVE PARTITIONING
101
--echo #------------------------------------------------------------------------
102
--echo # 6.1 ALTER ... REMOVE PARTITIONING;
103
let $alter= ALTER TABLE t1 REMOVE PARTITIONING;
104
--source suite/parts/inc/partition_alter_41.inc