mysql
user:
create user 'name'@'host' identified by 'passwd'
grant usage/all privileges on *.* to 'name'@'host' identified by 'passwd'
with max_queries_per_hour num max_update_per_hour num max_connections_per_hour num max_user_connections num
table structure:
select * from tableName procedure analyse();
维护:
optimize;
check;
repaire;
analyze table tableName;
原生数据:
information_schema, 具有 61个表; mysqL, 具有31个表; performance_schema,具有87个表; sys, 具有1个表, 100个视图.
show processlist;kill id;
垂直分割:列长度最好可fixed,活跃度最好一致(可使用缓存);
对于锁表度操作,最好拆分;
慎用永久连接;
insert into table2(columns..) select columns.. from table1;table2存在;
select into table2(columns..) from table1;table2不存在;
select ... into outfile 'filename'