Question: 28
The MySQL error log shows:
InnoDB: Warning: a long semaphore wait:
The relevant parts of the InnoDB monitor output shows:

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资源时,使用锁进行并发控制,而后台线程访问系统共享资源时使用信号量进行并发控制。因此出现出现长时间信号量等待的情况时,往往是后台资源访问系统共享资源时出现竞争。
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




