MySQL5.7 OCP每日一题Day19

2024年 5月 27日 28.9k 0

Question: 28
The MySQL error log shows:
InnoDB: Warning: a long semaphore wait:
The relevant parts of the InnoDB monitor output shows:
MySQL5.7 OCP每日一题--Day19-1

Which two options would help avoid the long wait in the future?
A. Increase the value of the innodb_lock_wait_timeout option.
B. Increase the value of the innodb_read_io_threads option.
C. Change the table to use HASH indexes instead of BTREE indexes.
D. Set the value of innodb_adaptive_hash_index to zero.
E. Deactivate the query cache.
F. Increase the size of the InnoDB buffer pool.

答案:DE
解析:MySQL是多线程服务,多线程之间并发操作时需要进行并发控制;前台线程访问MySQL资源时,使用锁进行并发控制,而后台线程访问系统共享资源时使用信号量进行并发控制。因此出现出现长时间信号量等待的情况时,往往是后台资源访问系统共享资源时出现竞争。

相关文章

pt-kill工具的使用
pt-ioprofile工具包的使用
数据库管理-第216期 Oracle的高可用-01(20240703)
DBMS_REPAIR EXAMPLE SCRIPT WITH PARTITION
数据库事务的四大特性: ACID 
使用BBED修复损坏的SYSTEM文件头

发布评论