Mysql My.ini详细说明(二)

2014-11-24 15:36:18 · 作者: · 浏览: 1
这大大降低了线程的数量创造需要。(如果你有一个好的改进线程实现方案,那么这个并不会给出一个显著的性能)
thread_cache_size=8
#*** MyISAM Specific options
MYISAM 特殊配置项
# The maximum size of the temporary file MySQL is allowed to use while
# recreating the index (during REPAIR, ALTER TABLE or LOAD DATA INFILE.
# If the file-size would be bigger than this, the index will be created
# through the key cache (which is slower).
Mysql临时文件允许使用重建索引(在修复,修改表结构,导入数据文件时)的最大大小。
如果文件大小会比这个大,该指数将被创建通过键缓存(很慢)
myisam_max_sort_file_size=100G
# If the temporary file used for fast index creation would be bigger
# than using the key cache by the amount specified here, then prefer the
# key cache method. This is mainly used to force long character keys in
# large tables to use the slower key cache method to create the index.
如果临时文件用于快速创建索引将比使用键缓存更大,那么键缓存的方法是很好的。这主要用于在比较大型的表使用缓慢的基础上,使用长字符串创建索引。
myisam_sort_buffer_size=35M
# Size of the Key Buffer, used to cache index blocks for MyISAM tables.
# Do not set it larger than 30% of your available memory, as some memory
# is also required by the OS to cache rows. Even if you're not using
# MyISAM tables, you should still set it to 8-64M as it will also be
# used for internal temporary disk tables.
在MyISAM表里用于缓存索引块。不要把它设置为大于你的可用内存的30%,因为一些内存还需要由OS缓存行,即使您没有使用MyISAM表,您仍然应该将其设置为8 - 64 m,因为它也会用于内部临时磁盘表
key_buffer_size=8M
# Size of the buffer used for doing full table scans of MyISAM tables.
# Allocated per thread, if a full scan is needed.
MyISAM表用来做全表扫描的缓冲区大小
如果需要一个完整的扫描,就分配给每一个线程
read_buffer_size=64K
read_rnd_buffer_size=256K
# This buffer is allocated when MySQL needs to rebuild the index in
# REPAIR, OPTIMZE, ALTER table statements as well as in LOAD DATA INFILE
# into an empty table. It is allocated per thread so be careful with
# large settings.
这个缓冲区是分配给:当MYSQL在需要修理,OPTIMZE,修改表结构语句以及导入加载数据
到一个空表时重建索引。它是分配给每个线程,所以在大型设置中要小心使用。
sort_buffer_size=256K
#*** INNODB Specific options ***
INNODB特殊项
INNODB保存数据目录
innodb_data_home_dir="E:/MySQL Datafiles/"
# Use this option if you have a MySQL server with InnoDB support enabled
# but you do not plan to use it. This will save memory and disk space
# and speed up some things.
#skip-innodb
# Additional memory pool that is used by InnoDB to store metadata
# information. If InnoDB requires more memory for this purpose it will
# start to allocate it from the OS. As this is fast enough on most
# recent operating systems, you normally do not need to change this
# value. SHOW INNODB STATUS will display the current amount used.
InnoDB存储元数据信息时的额外的内存池。如果需要更多的内存,InnoDB为此它会分配它的操作 系统内存。因为在大多数操作系统中,这已经是足够快的了,所以通常不需要修改这个值。SHOW INNODB STATUS会显示当前的使用量
innodb_additional_mem_pool_size=2M
# If set to 1, InnoDB will flush (fsync) the transaction logs to the
# disk at each commit, which offers full ACID behavior. If you are
# willing to compromise this safety, and you are running small
# transactions, you may set this to 0 or 2 to reduce disk I/O to the
# logs. Value 0 means that the log is only written to the log file and
# the log file flushed to disk approximately once per second. Value 2
# means the log is written to the log file at each commit, but the log
# file is only flushed to disk approximately once per second.
如果设置为1,InnoDB会在每个提交磁盘冲洗事