[{"createTime":1735734952000,"id":1,"img":"hwy_ms_500_252.jpeg","link":"https://activity.huaweicloud.com/cps.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=V1g3MDY4NTY=&utm_medium=cps&utm_campaign=201905","name":"华为云秒杀","status":9,"txt":"华为云38元秒杀","type":1,"updateTime":1735747411000,"userId":3},{"createTime":1736173885000,"id":2,"img":"txy_480_300.png","link":"https://cloud.tencent.com/act/cps/redirect?redirect=1077&cps_key=edb15096bfff75effaaa8c8bb66138bd&from=console","name":"腾讯云秒杀","status":9,"txt":"腾讯云限量秒杀","type":1,"updateTime":1736173885000,"userId":3},{"createTime":1736177492000,"id":3,"img":"aly_251_140.png","link":"https://www.aliyun.com/minisite/goods?userCode=pwp8kmv3","memo":"","name":"阿里云","status":9,"txt":"阿里云2折起","type":1,"updateTime":1736177492000,"userId":3},{"createTime":1735660800000,"id":4,"img":"vultr_560_300.png","link":"https://www.vultr.com/?ref=9603742-8H","name":"Vultr","status":9,"txt":"Vultr送$100","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":5,"img":"jdy_663_320.jpg","link":"https://3.cn/2ay1-e5t","name":"京东云","status":9,"txt":"京东云特惠专区","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":6,"img":"new_ads.png","link":"https://www.iodraw.com/ads","name":"发布广告","status":9,"txt":"发布广告","type":1,"updateTime":1735660800000,"userId":3},{"createTime":1735660800000,"id":7,"img":"yun_910_50.png","link":"https://activity.huaweicloud.com/discount_area_v5/index.html?fromacct=261f35b6-af54-4511-a2ca-910fa15905d1&utm_source=aXhpYW95YW5nOA===&utm_medium=cps&utm_campaign=201905","name":"底部","status":9,"txt":"高性能云服务器2折起","type":2,"updateTime":1735660800000,"userId":3}]
show variables like '%innodb_buffer_pool_size%' 查看mysql数据库缓存池大小
show variables like '%innodb_old_blocks_pct%' 查看缓存池链表 新生代和老年代的比例
show variables like '%innodb_old_blocks_time%' 查看缓存池老年代停留时间参数
SHOW VARIABLES LIKE 'slow_query%'; 查看mysql数据库慢查询日志的设置
SHOW VARIABLES LIKE 'long_query_time'; 查看mysql数据库慢查询日志的时间参数设置
SHOW VARIABLES LIKE 'log_error'; 查看错误日志文件的路径和文件名
SHOW GLOBAL VARIABLES LIKE 'innodb_max_dirty_pages_pct' ; 查看InnoDB缓冲池中可以存在多少个脏页
SHOW GLOBAL VARIABLES LIKE 'innodb_lru_scan_depth'; 查看InnoDB LRU算法一次扫描的深度
show GLOBAL VARIABLES like '%innodb_lock_wait_timeout%'; 设置InnoDB存储引擎的锁等待超时时间
set GLOBAL innodb_lock_wait_timeout=100; 将 “innodb_lock_wait_timeout” 的值设置为100
。这意味着,如果一个事务等待获取锁的时间超过100秒,该事务将会发生超时并被回滚。
show variables like 'table_open_cache'; MySQL 服务器打开的表格数目。该变量的默认值通常是2000。
show global status like 'Open%tables'; 查询 MySQL 数据库中当前打开表格的数量信息。
show global status like 'read_buffer_size'; MySQL
服务器在读取数据的时候使用的缓冲区大小。可以通过调整缓冲区大小来优化查询性能。
set tmp_table_size=1024; 设置 MySQL 临时表所允许使用的内存大小。
set sort_buffer_size=32768; 设置 MySQL 排序操作所使用的缓冲区的大小。
set max_length_for_sort_data=16; 置在排序操作中,所允许使用内存缓冲区进行排序的数据块的最大长度。