create
table
`ts_rta_visit_from` (
`id`
int(11) not
null auto_increment,
`stat_date`
varchar(8) not
null comment '統計日期(日期:yyyymmdd)',
`stat_minute`
varchar(4) default
null comment '統計分鐘(分鐘:hhmm)(每5分鐘乙個取值,一天共288個取值,從0000-2355)',
`site_id`
varchar(2) default
null comment '站點',
`terminal_type_id`
varchar(1) default
'1' comment '終端型別編碼',
`new_old_uv_flag`
varchar(1) default
null comment '新老訪客標識',
`visit_from_id`
varchar(2) default
null comment '訪問**編碼',
`visit_from_class_id`
varchar(1) default
null comment '訪問**大類編碼',
`compare_period_id`
varchar(2) default
null comment '對比時間段編碼',
`cd_pv_num`
int(11) default
null comment '當天累計瀏覽量',
`cd_uv_num`
int(11) default
null comment '當天累計訪客數',
`cd_visit_num`
int(11) default
null comment '當天累計訪問次數',
`cd_visit_duration` bigint(20) default
null comment '當天累計訪問時長',
`cd_url_num`
int(11) default
null comment '當天累計頁面數',
`data_time`
varchar(8) default
null comment '資料處理時間',
primary
key (`id`,`stat_date`)
) engine=innodb auto_increment=4177
default charset=utf8 comment='應用層_實時分析_流量**分析\n\n兩份資料:乙份到流量**小類,乙份到流量**大類'
/*!50500 partition by list columns(stat_date)
(partition p20151010 values
in ('20151010') engine = innodb,
partition p20151011 values
in ('20151011') engine = innodb,
partition p20151203 values
in ('20151203') engine = innodb,
partition p20151204 values
in ('20151204') engine = innodb,
partition p20151205 values
in ('20151205') engine = innodb,
partition p20151206 values
in ('20151206') engine = innodb,
partition p20151207 values
in ('20151207') engine = innodb,
partition p20151208 values
in ('20151208') engine = innodb)
alter
table ts_rta_visit_channel add partition (partition p20151207 values
in ('20151207') engine = innodb);
MySQL每天自動增加分割槽
參考 有乙個表tb 3a huandan detail,每天有300w左右的資料。查詢太慢了,網上了解了一下,可以做表分割槽。由於資料較大,所以決定做定時任務每天執行存過自動進行分割槽。1 在進行自動增加分割槽前一定得先對錶手動分幾個區 alter table tb 3a huandan detai...
增加分割槽空間
增加分割槽空間 root home 1 備份home cp r home homebak 2 解除安裝home umount home 程序占有 fuser m v i k home kill 9pid root bogon do you really want to remove active l...
LVM增加分割槽大小
有的時候,在使用系統一段時間,因為種種原因不得不擴大分割槽,這裡是指擴大已經存在的分割槽,而且不影響原來分割槽的資料 因為在安裝系統時,多留了乙個心眼,就是擔心哪天突然需要增加分割槽容量,所以在當時使用的是lvm分割槽來安裝系統。當然如果你的是其他分割槽格式,也不用擔心,可以轉換為lvm格式。一 準...