-- 查看表状态
check table tablename
-- 修复表
repair table tablename
-- 查看表空间
show variables like 'innodb_file_per_table';
-- 关闭独立表空间
set global innodb_file_per_table=off;
-- 命令行修改的话,是临时修改,重启mysql的话还是一样的,不会真正的修改,要去配置文件修改才是真正的修改。
-- 创建表的时候可以指定引擎
create table test(id int(10)) engine='innodb';
-- 单位时间内处理的事务数(TPS)
show global status like 'Com_commit';
show global status like 'Com_rollback';
-- 单位时间内处理的查询数(QPS)
show global status like 'Question%';
-- 刷新表
flush tables;
-- 基准测试
mysqlslap --concurrency=1,50,100,200 --iterations=3 --number-int-cols=5 --number-char-cols=5 --auto-generate-sql
--auto-generate-sql-add-autoincrement --engine=myisam,innodb --number-of-queries=10 --create-schema=test
mysqlslap --no-defaults -hlocalhost -uroot -proot -P3306 --concurrency=1,50,100,200 --iterations=3 --number-int-cols=5 --number-char-cols=5 --auto-generate-sql --auto-generate-sql-add-autoincrement --engine=myisam,innodb --number-of-queries=10 --create-schema=test --only-print |more
本文地址:https://blog.csdn.net/xiaoduu/article/details/107374170
如对本文有疑问, 点击进行留言回复!!
项目实战: CMDB自动化资产扫描(搞懂这个项目 算你没白学运维)
MySQL中建表时可空(NULL)和非空(NOT NULL)的用法详解
SSD原理及Pytorch代码解读——网络架构(二):特征提取网络及总体计算过程
网友评论