人生不设限

导航

create table b1 as select * from b建表锁表测试

A: create table a1 like a; insert into a1 as select * from a;

B: create table b1 as select * from b;

测试AB两种建表语句对原始表的影响。其中a、b的数据量均为300000 rows。

如果使用A种方式建表,insert过程可能会堵塞DML操作

如果使用B中方式建表,此建表过程全程锁表;

建议:生产环境使用A种方式建备份表;

posted on 2016-06-12 18:39  风的_理想  阅读(3510)  评论(0编辑  收藏  举报