Msyql到Vertica
1、mysql中在openshop 数据库中选择其中一个300W左右数据的表
create table ip_records_tmp_01
AS
SELECT * FROM ip_records_tmp t
WHERE t.datetime<= '2015-05-01'
2、vertica创建表ip_records_tmp_01,注意字段类型和mysql有点不一样。
全量抽取2478130条数据,耗时30s,速度不错!
3、在mysql中新增972948条数据,删除462151条数据,更新273427条数据
新增:
insert into ip_records_tmp_01
select * from ip_records_tmp t
where t.`datetime` > '2015-05-01';
删除:
delete from ip_records_tmp_01
where `datetime` <= '2015-05-01' and `datetime` >'2015-04-01';
更新:
update ip_records_tmp_01
set remark1 ='INMAN',remark2 ='LEFTLIFE'
where
`datetime` <= '2015-04-01' AND `datetime` >