MYSQL5.5和5.6参数的差异

performance_schema 在 MySQL 5.6 中默认是开启的,但相关的很多参数相比 MySQL 5.5 却是降低了,例如 performance_schema 自动调整到 445 个表和 224 线程,比 MySQL 5.5 低。尽管默认 max_connections 只是 150 ,比 200 还小。
innodb_stats_on_metadata 在 MySQL 5.6 默认关闭,使得 information_schema 的查询速度快很多。
innodb_log_file_size – 默认值从 5MB 提升到 50MB,这是一个好的改变,虽然我觉得这个默认数值还可以再大些。对于写负载高的情况下,默认配置的 MySQL 5.6 性能更好。
back_log 改动比较小,从 50 改为 80。如果系统每秒处理的连接数很高,还需要继续提高这个配置的值。
open_files_limit 由原来的 1024 改为 5000
innodb_auto_extend_increment 由 8MB 改为 64MB,可帮助降低碎片。
max_connect_errors 从 10 改为 100,可降低潜在的连接堵塞,但还可以更高些。
sort_buffer_size 从 2M 将为 256K,这可避免小排序导致的资源浪费,但是对大的排序有负面的影响。
max_allowed_packet 从 1MB 改为 4MB 让 MySQL 可处理更大的查询。
join_buffer_size 从 128K 改为 256K,我觉得这个改动影响不大。
table_open_cache 从 400 提高到 2000,挺好!
innodb_buffer_pool_instances 从 1 改为 8,用于优化更高并发的负载。
query_cache_type 和 query_cache_size. The behavior is “no cache” by default still but it is achieved differently now. The query_cache_type is now off by default with default size of 1MB while in MySQL 5.5 and before it was “ON” by default with query cache size of 0 which makes it disabled. I wish query_cache_size though would be larger by default as value of 1M is too small to be practical if someone tries to enable it.
sql_mode has NO_ENGINE_SUBSTITUTION value by default which is good change as trying to create Innodb table but getting MyISAM because Innodb was disabled for some reason was very error prone gotcha. Note this is as far as MySQL 5.6 goes - STRICT_MODE and other safer behaviors are not enabled by default.
innodb_old_blocks_time 设置为 1000,很好的改变,默认扫描 InnoDB 缓冲池大小。
thread_cache_size 默认启用,对很多连接和断开连接操作的情况下有帮助。
sync_relay_log_info and sync_master_info 默认值有原来的 0 改为 10000. 该改动几乎不会影响负载。
secure_auth 默认开启,要求新的密码握手,特别是阻止老的不安全的做法,很好!
innodb_concurrency_tickets has been increased from 500 to 5000. If you’re using innodb_thread_concurrencythis will reduce overhead associated with grabbing and releasing innodb_thread_concurrency slot but will increase potential starvation of queued threads especially for IO bound workloads. Most users will not be affected though as innodb_thread_concurrency is 0 by default so this queuing feature is disabled.
innodb_purge_threads 默认为 1 ,使用专用的后台 purge 线程,好!
innodb_open_files 由 300 改为 2000,好!
innodb_data_file_path got a small change with starting ibdata1 size raised from 10M to 12M. I’m not sure what is the purpose of this change but it is unlikely to have any practical meaning for users. Considering the defaultinnodb_auto_extend_increment is 64 starting with 64M might have made more sense.
innodb_purge_patch_size 从 20 改为 300.
innodb_file_per_table 默认启用,这个改变很大,而且很棒。特别是当你的表非常大的时候。
optimizer_switch is the catch all variable for a lot of optimizer options. I wonder why was not it implemented as number of different variables which would make more sense in my opinion. MySQL 5.6 adds a lot more optimizer switches which you can play with:
01 |
mysql [localhost] {msandbox} (test) > select * from var55 where variable_name= 'OPTIMIZER_SWITCH' \G |
02 |
*************************** 1. row *************************** |
03 |
VARIABLE_NAME: OPTIMIZER_SWITCH |
04 |
VARIABLE_VALUE: index_merge= on ,index_merge_union= on ,index_merge_sort_union= on ,index_merge_intersection= on ,engine_condition_pushdown= on |
05 |
1 row in set (0.00 sec) |
06 |
07 |
mysql [localhost] {msandbox} (test) > select * from var56 where variable_name= 'OPTIMIZER_SWITCH' \G |
08 |
*************************** 1. row *************************** |
09 |
VARIABLE_NAME: OPTIMIZER_SWITCH |
10 |
VARIABLE_VALUE: index_merge= on ,index_merge_union= on ,index_merge_sort_union= on ,index_merge_intersection= on ,engine_condition_pushdown= on ,index_condition_pushdown= on ,mrr= on ,mrr_cost_based= on ,block_nested_loop= on ,batched_key_access= off ,materialization= on ,semijoin= on ,loosescan= on ,firstmatch= on ,subquery_materialization_cost_based= on ,use_index_extensions= on |
11 |
1 row in set (0.00 sec) |
MYSQL5.5和5.6参数的差异的更多相关文章
- gdb 不同位置,函数调用参数显示差异
gdb 不同位置,函数调用参数显示差异,如: copy_strings (argc=1, argv=0xffcf08, page=0xffce6c, p=131068, from_kmem=2) at ...
- MySQL5.7安装过程以及参数和设置说明
最近在讲MySQL课程,为了省事就在用MySQL5.5版本.因为win10不论32还是64都可以运行MySQL32位.可有很多使用者了解MySQL官网之后,去下载最新版的MySQL来使用,这点我不反对 ...
- 【转】MySQL5.5的my.cnf 参数详解
这篇文章很多地方只是翻译了my.cnf原始配置文件的说明 以下原文中有些参数事实上不适用于MySQL5.5,不知道原作者是否有经过实际测试,比如log-slow-queries应该写成slow-que ...
- mysql5.6快速安装及参数详解
一.所需软件 软件名称 版本 下载地址 当前环境 管理员账号/密码 mysql 5.6 yum安装 centOS6.7系统 zxfly/zxfly 二.安装说明 数据库所在目录 /database/m ...
- MySQL5.7应当注意的参数
简介: 本篇文章主要介绍 MySQL 初始化应当注意的参数,对于不同环境间实例迁移,这些参数同样应当注意. 注: 本文介绍的参数都是在配置文件 [mysqld] 部分. server_id 和 log ...
- 一天JavaScript示例-在功能上的标量参数和数组参数的差异
<!DOCTYPE> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta h ...
- 【查阅】mysql配置文件/参数文件重要参数笔录(my.cnf)
持续更新,积累自己对参数的理解 [1]my.cnf参数 [client]port = 3306socket = /mysql/data/3306/mysql.sockdefault-character ...
- mysql5.6 timestamp
1.timestamp 默认值 CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP 在创建新记录和修改现有记录的时候都对这个数据列刷新 CURRENT_TIME ...
- MySql5.7-多源复制(多主单从)
1.1.主库配置 my.cnf #确保唯一 server-id=1 #作为Master要开启binlog log-bin=mysql-bin #binlog format有三种形式:Stateme ...
随机推荐
- Spring入门(2)-通过构造器注入Bean
Spring入门(2)-通过构造器注入Bean 前一篇文章将了最基本的spring例子,这篇文章中,介绍一下带有参数的构造函数和通过构造器注入对象引用. 0. 目录 带有参数的构造函数 通过构造器注入 ...
- HDU 2874 Connections between cities (LCA)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2874 题意是给你n个点,m条边(无向),q个询问.接下来m行,每行两个点一个边权,而且这个图不能有环路 ...
- Contest 7.23(不知道算什么)
Problem A URAL 1181 Cutting a Painted Polygon 题目大意就是说有一个N边形,让你做N-3条边,让他们的每个三角形的三个顶点颜色都不相同. 这里有一个引理 ...
- C#学习笔记(五):泛型
认识泛型 泛型使类型参数化,从而实现了算法上的代码重用. 同时由于去掉了转换中装箱和拆箱的操作,使用泛型还可以提高程序的运行速度. 我们先看看C#自带的使用了泛型的类: using System.Co ...
- MVC神韵---你想在哪解脱!(十五)
在模型中添加验证规则 本节介绍如何在我们的Movie(电影)模型中添加一些验证规则,同时确认当用户使用我们的应用程序创建或编辑电影信息时将使用这些验证规则对用户输入的信息进行检查.首先,让我们在Mov ...
- C#中的where从句
C#中的where从句 2011-07-03 13:07OrphousV | 分类:C#/.NET | 浏览8443次 能解释一下下面两段代码中where的作用吗?using System;publi ...
- SQLite多线程写锁文件解决方案
在sqlite编程中多线程同时写时会出现异常,我写了个类来解决这个问题. 思路很简单,就是在开始写操作时,记下写操作的托管线程id,表示目前有线程正在做写操作:其他线程来写时,需要先检测是否有进程正在 ...
- IE8不显示字体图标
bootstrap流行,随着自带的字体图标也火起来了.美丽的字体系统中没有.制作成字体文件,下载到本地.浏览美丽的网页哦. 在项目中遇到有些IE8显示不了,原因是IE8下设置了禁止字体下载
- 类型查找器 ITypeFinder
NopCommerce为了支持插件功能,以及支持一些自动注册的功能.系统提供了类型查找器.ITypeFinder以及实现类就是提供此功能.通过类型查找器可以查找本程序域中的类,也可以查找整个bin目录 ...
- Discuz!X/模板标签说明
Discuz 模板标签说明 Discuz! 的模板采用近似 PHP 表达式的语法,基本都是可识别的HTML,但涉及到变量和动态内容时,基本形式下: <!-{ 代码内容 }-> 逻辑元素包围 ...