zoukankan      html  css  js  c++  java
  • mysql5.6新特性总结

    一. server参数默认值设置的变化
    http://dev.mysql.com/doc/refman/5.6/en/server-default-changes.html

    二. innodb增强
    1.全文本搜索(full-text search)。
    2.支持online DDL。
    3.独立表空间的.ibd文件可以在建表时指定目录:
    http://dev.mysql.com/doc/refman/5.6/en/tablespace-placing.html
    4.导入和导出表空间:copy文件的方式比mysqldump快好多。
    http://dev.mysql.com/doc/refman/5.6/en/tablespace-copying.html
    5. 新增参数innodb_page_size设置页大小。
    6.缓冲池flush算法增强:
    http://dev.mysql.com/doc/refman/5.6/en/innodb-performance.html
    7.支持使用nosql api访问innodb表(整合memcached):
    http://dev.mysql.com/doc/refman/5.6/en/innodb-memcached.html
    8.优化器统计持续化:重启不丢失。
    http://dev.mysql.com/doc/refman/5.6/en/innodb-performance.html
    9.支持read-only事务:
    http://dev.mysql.com/doc/refman/5.6/en/innodb-performance.html
    10.undo log可独立出系统表空间:
    http://dev.mysql.com/doc/refman/5.6/en/innodb-performance.html
    11.redo log最大增至512G。
    http://dev.mysql.com/doc/refman/5.6/en/innodb-redo-log-size-increase.html
    12.innodb支持read_only介质,如DVD,参数--innodb-readonlyhttp://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html
    13.INFORMATION_SCHEMA新增相关字典表若干。
    14.innodb内部性能增强:包括将flushing操作独立出主线程,减少核心互斥锁,可设置多个清除线程,减少大内存系统的资源争夺。
    15.检测死锁算法增强。在非递归情况下死锁检测:死锁信息可以记录到 error 日志,方便分析。
    16.buffer pool预热:
    http://dev.mysql.com/doc/refman/5.6/en/innodb-performance.html

    三. 分区增强
    1.最大分区个数增值8192,包括分区和子分区。
    2.支持分区表的分区(或子分区)与非分区表交换:ALTER TABLE ... EXCHANGE PARTITION
    3.查询支持显式的分区语句:如SELECT * FROM t PARTITION (p0, p1) WHERE c < 5
    http://dev.mysql.com/doc/refman/5.6/en/partitioning-selection.html
    4.简化分区锁增强性能:
    http://dev.mysql.com/doc/refman/5.6/en/partitioning-limitations-locking.html

    四. 复制和日志增强
    1.新增GTID复制:
    http://dev.mysql.com/doc/refman/5.6/en/replication-gtids.html
    2.新增binlog_row_image
    http://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html
    参数,可只记录row格式下所用字段的修改(而不是像以前一样记录全部列),节省空间等资源。
    3.master.info和relay-log.info支持存储在表中。
    4.mysqlbinlog命令支持binlog备份(备份后仍为二进制的binlog而不是文本)http://dev.mysql.com/doc/refman/5.6/en/mysqlbinlog-backup.html
    5.支持延时复制:在change master to中增加MASTER_DELAY选项。
    6.有多个网络接口的slave可指定使用其中一个:在change master to中增加MASTER_BIND。
    7.新增log_bin_basename
    http://dev.mysql.com/doc/refman/5.6/en/replication-options-binary-log.html
    relay_log_basename
    http://dev.mysql.com/doc/refman/5.6/en/replication-options-slave.html
    系统变量。
    8.基于schema级别的多线程复制。
    9.binlog支持crash-safe。

    五. 优化器增强
    1.limit优化:
    http://dev.mysql.com/doc/refman/5.6/en/limit-optimization.html
    2. MRR优化(Multi-Range Read
    http://dev.mysql.com/doc/refman/5.6/en/mrr-optimization.html
    http://dev.mysql.com/doc/refman/5.6/en/mrr-optimization.html
    3.ICP优化(Index Condition Pushdown):
    http://dev.mysql.com/doc/refman/5.6/en/index-condition-pushdown-optimization.html
    4.explain语句支持insert、delete、update、replace语句,并且支持json格式。
    5.新增连接算法BKA(Batched Key Access):
    http://dev.mysql.com/doc/refman/5.6/en/bnl-bka-optimization.html
    6.子查询优化:包括物化和半连接优化等特性。
    7. 面向开发者的优化器追踪特性。

    六. 数据类型
    1.time、datetime、timestamp类型支持微妙(小数点后6位);表格式的slowlog将不会被截断。
    2.datetime类型支持DEFAULT CURRENT_TIMESTAMP和ON UPDATE CURRENT_TIMESTAMP。
    3.增加explicit_defaults_for_timestamp系统变量明确timestamp默认值。
    4.year(2)被限制,将转换成year(4)。

    七. Host cache增强
    1.新增Connection_errors_xxx
    http://dev.mysql.com/doc/refman/5.6/en/server-status-variables.html
    系列状态参数。
    2.新增host_cache_size系统变量。

    八. 删除的特性
    1. --log和log移除,用 --general_log 和 --general_log_file=file_name 替换。
    http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html
    http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html
    2. log_slow_queries移除,只有slow_query_log。
    3. --one-thread系统参数移除,用 --thread_handling=no-threads 替换。
    http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html
    4. --safe-mode 系统参数移除。
    5. --skip-thread-priority系统参数移除。
    6. --table-cache移除,用 table_open_cache 替换。
    http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html
    7. --init-rpl-role、--rpl-recovery-rank、rpl_recovery_rank、Rpl_status移除。
    8. engine_condition_pushdown系统变量移除,engine_condition_pushdown表示并入optimizer_switch 变量。
    http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html
    9. have_csv, have_innodb, have_ndbcluster, have_partitioning移除,用show engines代替。
    10. sql_big_tables移除,用big_tables 代替。
    http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html
    11. sql_low_priority_updates被low_priority_updates 代替。
    http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html
    12. sql_max_join_size被max_join_size 代替。
    http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html
    13. max_long_data_size被max_allowed_packet 代替。
    http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html
    14. FLUSH MASTER 和 FLUSH SLAVE语句移除,使用reset master和reset slave代替。
    15. slave start和slave stop语句移除,用start slave和stop slave代替。
    16. SHOW AUTHORS 和 SHOW CONTRIBUTORS 语句移除。
    17. set语句的OPTION 和nd ONE_SHOT移除。

    九. MySQL Performance Schema 增强
    1. Statements/execution stages - 找出消耗资源热点SQL
    2. Table and Index I/O : 那些表和索引引起负载过高 ?
    3. Table Locks : 那些表引起竞争?
    4. Users/Hosts/Accounts 级别资源消耗 :找出消耗资源最多的Users/Hosts/Accounts
    5. Network I/O : 网络还是应用程序? 会话闲置多久?
    6. 通过 thread, user, host, account, object聚合总结。

    具体信息请阅读mysql5.6手册:http://dev.mysql.com/doc/refman/5.6/en/index.html

  • 相关阅读:
    linux命令学习
    linux sar命令详解
    消息中间件设计
    google三驾马车
    Apache ZooKeeper 服务启动源码解释
    ubuntu16 ccls neovim coc.nvim ccls langserver安装
    ubuntu 字体安装 —— 以nerd font为例
    neovim
    vim youcompleteme conda 虚拟环境
    sublime 插件管理
  • 原文地址:https://www.cnblogs.com/mhxsh/p/6228954.html
Copyright © 2011-2022 走看看