1.gbase8a gbase 侧查看数据加载进度
select * from information_schema.load_status\G;
–查看引擎内存状态
show ENGINE express status;
2. gbase8a gbase侧查看 进程 及 kill进程
show processlist;
kill pid;
3.查询gbase8a侧所有aaa_前缀数据库下的表名,并拼接为 库名.表名结构,输出到文件中
select concat(dbName,’.’,tbName) AS newcol from gbase.table_distribution where dbName like ‘aaa_%’ into outfile ‘/GBase/0124.csv’;
#select dbName||’.’||tbName as newcol from gbase.table_distribution into outfile ‘/GBase/tablename.csv’;与concat等价
4.修改列名 列定义
情况一:给 “varchar” 类型列,修改列名和增加长度,数据不会被清理–change,只有给varchar列增加长度才可以,其他列类型不允许
alter table table_name change column 旧列名 新列名 新长度/旧长度; --不改长度时,也需要该列的旧长度定义
alter table table_name modify column 旧列名 新长度 after 前一列名/first; --不能改列名,只能改长度(或位置),所以只需要一个旧列名
情况二:修改列位置 modify
alter table table_name modify column 列A after 列B;
alter table table_name modify column 列A first;