查看表的分布状况mysql> select count(*) from justin;+----------+| count(*) |+----------+| 5845246 |+----------+1 row in set (0.00 sec) mysql> select month(create_time),count(*) from justin group by month(create_time);+-----------------------+----------+|…
--操作的用户需要有以下的权限 GRANT CONNECT, RESOURCE TO CMIGDW; GRANT EXECUTE ON DBMS_REDEFINITION TO CMIGDW; GRANT ALTER ANY TABLE TO CMIGDW; GRANT DROP ANY TABLE TO CMIGDW; GRANT LOCK ANY TABLE TO CMIGDW; GRANT CREATE ANY TABLE TO CMIGDW; GRANT SELECT ANY TABLE…
12c以前非分区表需要转换为分区, 如果不停业务的话可以使用在线重定义,只有在表进行切换的时候会有短暂的锁表. 12c 中alter table online clause 实现了表上现有的索引有效,又不停业务. 测试一:非分区表转分区表,索引转换为oracle内部规则.-- 建非分区表create table andy_clause as select * from user_objects where object_id is not null;--创建非分区表索引create inde…
排错-解决MySQL非聚合列未包含在GROUP BY子句报错问题 By:授客 QQ:1033553122 测试环境 win10 MySQL 5.7 问题描述: 执行类似以下mysql查询, SELECT id, name, count(*) AS cnt FROM case_table GROUP BY name 报错,如下: 服务器内部错误 (1055, "Expression #1 of SELECT list is not in GROUP BY clause and contains…