MySQL Variables thread_handling 数据库 参数变量解释及正确配置使用
本站中文解释
_large_packages
MySQL参数变量thread_handling_large_packages用于发送大型查询数据包,默认情况下,当查询数据包大小大于1MB时,MySQL将以多线程的形式处理发送过来的数据包,以提高处理效率,默认设置为1MB。如果想要修改MySQL处理大数据包的最大容量,则可以在my.cnf(MySQL或者MariaDB)配置文件中设置”thread_handling_large_packages”,然后将其设置为想要的容量大小,如20M。如下:thread_handling_large_packages=20M,修改完成后,重启MySQL服务即可。
官方英文解释
thread_handling
| Command-Line Format | --thread-handling=name |
|---|---|
| System Variable | thread_handling |
| Scope | Global |
| Dynamic | No |
| Type | Enumeration |
| Default Value | one-thread-per-connection |
| Valid Values |
|
The thread-handling model used by the server for connection
threads. The permissible values are
no-threads (the server uses a single thread
to handle one connection),
one-thread-per-connection (the server uses
one thread to handle each client connection), and
loaded-dynamically (set by the thread pool
plugin when it initializes). no-threads is
useful for debugging under Linux; see
Section 5.8, “Debugging MySQL”.
This variable has no effect for the embedded server
(libmysqld) and as of MySQL 5.7.2 is no
longer visible within the embedded server.