Setting `max_seeks_for_key` too high can lead to several risks:
1. Increased Disk I/O: Higher values can cause MySQL to perform more disk I/O operations, which can lead to increased disk usage and slower performance.
2. Increased Memory Usage: Higher values can also cause MySQL to use more memory, which can lead to increased memory usage and potentially even memory exhaustion.
3. Increased CPU Usage: Higher values can cause MySQL to perform more CPU-intensive operations, which can lead to increased CPU usage and potentially even CPU exhaustion.
4. Reduced Performance: Higher values can cause MySQL to spend more time performing disk I/O operations and less time executing queries, which can lead to reduced performance and slower query execution times.
5. Increased Risk of Deadlocks: Higher values can increase the risk of deadlocks, especially in multi-threaded environments, as MySQL may spend more time waiting for disk I/O operations to complete.
6. Increased Risk of Lock Contention: Higher values can increase the risk of lock contention, especially in multi-threaded environments, as MySQL may spend more time waiting for disk I/O operations to complete.
7. Reduced Scalability: Higher values can reduce the scalability of MySQL, especially in large-scale environments, as MySQL may spend more time performing disk I/O operations and less time executing queries.
8. Increased Risk of Data Corruption: Higher values can increase the risk of data corruption, especially in environments with high disk I/O activity, as MySQL may spend more time performing disk I/O operations and less time executing queries.
9. Increased Risk of Disk Failure: Higher values can increase the risk of disk failure, especially in environments with high disk I/O activity, as MySQL may spend more time performing disk I/O operations and less time executing queries.
10. Increased Risk of System Failure: Higher values can increase the risk of system failure, especially in environments with high disk I/O activity, as MySQL may spend more time performing disk I/O operations and less time executing queries.
It is essential to carefully evaluate the risks and benefits of setting `max_seeks_for_key` too high and to consider the specific requirements and constraints of your environment before making any changes.
Citations:[1] https://stackoverflow.com/questions/27176623/mysql-server-system-variables-max-seeks-for-key-practical-example
[2] https://www.oreilly.com/library/view/high-performance-mysql/9780596101718/ch04.html
[3] https://mariadb.com/kb/en/server-system-variables/
[4] https://aws.amazon.com/fr/blogs/database/best-practices-for-configuring-parameters-for-amazon-rds-for-mysql-part-1-parameters-related-to-performance/
[5] https://forums.percona.com/t/cpu-load-100/555