innodb相关设置变量

来源:互联网 发布:穿越火线mac 编辑:程序博客网 时间:2024/05/16 07:23

| innodb_adaptive_hash_index | ON |是否开启适应性hash索引
| innodb_additional_mem_pool_size | 1048576 |InnoDB用来存储数据目录信息&其它内部数据结构的内存池的大小
| innodb_autoextend_increment | 8 |当自动扩展表空间被填满之时,为扩展而增加的尺寸(MB为单位)
| innodb_autoinc_lock_mode | 1 |The locking mode to use for generating auto-increment values,The allowable values are 0, 1, or 2, for “traditional”, “consecutive”, or “interleaved” lock mode
| innodb_buffer_pool_size | 8388608 |缓冲池大小
| innodb_checksums | ON |InnoDB在所有对磁盘的页面读取上使用校验和验证以确保额外容错防止硬件损坏或数据文件
| innodb_commit_concurrency | 0 |The number of threads that can commit at the same time
| innodb_concurrency_tickets | 500 |直到线程用尽了这个值,在再次进入innodb时才需要检查
| innodb_data_file_path | ibdata1:10M:autoextend |innodb数据文件
| innodb_data_home_dir |  |innodb文件目录
| innodb_doublewrite | ON |InnoDB存储所有数据两次,双写
| innodb_fast_shutdown | 1 |0,1,2 innodb在关闭时所要做的操作类型
| innodb_file_io_threads | 4 |InnoDB中文件I/O线程的数量
| innodb_file_per_table | OFF |InnoDB用自己的.ibd文件为存储数据和索引创建每一个新表,而不是在共享表空间中创建
| innodb_flush_log_at_trx_commit | 1 |0,1,2日志缓冲->日志文件->磁盘的刷新时机
| innodb_flush_method | |使用什么方法来flush
| innodb_force_recovery | 0 |1-6当这个选项值大于零之时,InnoDB阻止用户修改数据
| innodb_lock_wait_timeout | 50 |InnoDB事务在被回滚之前可以等待一个锁定的超时秒数
| innodb_locks_unsafe_for_binlog | OFF |索引锁+gap锁(幻读)
| innodb_log_buffer_size | 1048576 |InnoDB用来往磁盘上的日志文件写操作的缓冲区的大小
| innodb_log_file_size | 5242880 |在日志组里每个日志文件的大小
| innodb_log_files_in_group | 2 |在日志组里日志文件的数目
| innodb_log_group_home_dir | ./ |到InnoDB日志文件的目录路径
| innodb_max_dirty_pages_pct | 90 |InnoDB中的主线程试着从缓冲池写页面,使得脏页(没有被写的页面)的百分比不超过这个值
| innodb_max_purge_lag | 0 |这个选项控制在净化操作被滞后之时,如何延迟INSERT, UPDATE和DELETE操作。这个参数的默认值是零,意为无延迟InnoDB事务系统维持一个事务列表,该列表有被UPDATE或DELETE操作标志为删除的索引记录。让这个列表的长度为purge_lag。当purge_lag超过innodb_max_purge_lag之时,每个INSERT, UPDATE和DELETE操作延迟 ((purge_lag/innodb_max_purge_lag)*10)-5毫秒
| innodb_mirrored_log_groups | 1 |我们为数据库保持的日志组内同样拷贝的数量
| innodb_open_files | 300 |在InnoDB中,这个选项仅与你使用多表空间时有关。它指定InnoDB一次可以保持打开的.ibd文件的最大数目
| innodb_rollback_on_timeout | OFF |InnoDB rolls back only the last statement on a transaction timeout by default. If --innodb_rollback_on_timeout is specified, a transaction timeout causes InnoDB to abort and roll back the entire transaction
| innodb_stats_on_metadata | ON |When this variable is enabled (which is the default, as before the variable was created), InnoDB updates statistics during metadata statements such as SHOW TABLE STATUS or SHOW INDEX, or when accessing the INFORMATION_SCHEMA tables TABLES or STATISTICS
| innodb_support_xa | ON |InnoDB support for two-phase commit in XA transactions is enabled
| innodb_sync_spin_loops | 20 |The number of times a thread waits for an InnoDB mutex to be freed before the thread is suspended
| innodb_table_locks | ON |InnoDB重视LOCK TABLES,直到所有其它线程已经释放他们所有对表的锁定
| innodb_thread_concurrency | 8 |InnoDB试着保持操作系统线程的数量少于或等于这个参数给出的限制
| innodb_thread_sleep_delay | 10000 |How long InnoDB threads sleep before joining the InnoDB queue, in microseconds
| innodb_use_legacy_cardinality_algorithm | ON |是否可使用原始的random cardinality算法

原创粉丝点击