zoukankan      html  css  js  c++  java
  • 总结一下关于mysql 5.6 新特性

    一直断断续续的看一些mysql特性,今天总结一下,以下是列表,网址 http://mariadb.org/ (也是类似的特性), http://mysql.com/

    最近在看关于mysql新特性的一些书

    一. server参数默认值设置的变化

    ParameterOld DefaultNew DefaultVersion
    back_log 50 Autosized using max_connections 5.6.6
    binlog_checksum NONE CRC32 5.6.6
    --binlog-row-event-max-size 1024 8192 5.6.6
    flush_time 1800 (on Windows) 0 5.6.6
    host_cache_size 128 Autosized using max_connections 5.6.8
    innodb_autoextend_increment 8 64 5.6.6
    innodb_buffer_pool_instances 1 8 (platform dependent) 5.6.6
    innodb_concurrency_tickets 500 5000 5.6.6
    innodb_data_file_path ibdata1:10M:autoextend ibdata1:12M:autoextend 5.6.7
    innodb_file_per_table 0 1 5.6.6
    innodb_log_file_size 5MB 48MB 5.6.8
    innodb_old_blocks_time 0 1000 5.6.6
    innodb_open_files 300 Autosized using innodb_file_per_table,table_open_cache 5.6.6
    innodb_stats_on_metadata ON OFF 5.6.6
    join_buffer_size 128KB 256KB 5.6.6
    max_allowed_packet 1MB 4MB 5.6.6
    max_connect_errors 10 100 5.6.6
    open_files_limit 0 Autosized using max_connections 5.6.8
    performance_schema OFF ON 5.6.6
    performance_schema_events_waits_history_long_size 10000 Autosized 5.6.6
    performance_schema_events_waits_history_size 10 Autosized 5.6.6
    performance_schema_max_cond_instances 1000 Autosized 5.6.6
    performance_schema_max_file_instances 10000 Autosized 5.6.6
    performance_schema_max_mutex_instances 1000000 Autosized 5.6.6
    performance_schema_max_rwlock_instances 1000000 Autosized 5.6.6
    performance_schema_max_table_handles 100000 Autosized 5.6.6
    performance_schema_max_table_instances 50000 Autosized 5.6.6
    performance_schema_max_thread_instances 1000 Autosized 5.6.6
    query_cache_size 0 1M 5.6.8
    query_cache_type ON OFF 5.6.8
    secure_auth OFF ON 5.6.7
    sql_mode '' (empty string) NO_ENGINE_SUBSTITUTION 5.6.6
    sync_master_info 0 10000 5.6.6
    sync_relay_log 0 10000 5.6.6
    sync_relay_log_info 0 10000 5.6.6
    table_definition_cache 400 Autosized using table_open_cache 5.6.8
    table_open_cache 400 2000 5.6.8
    thread_cache_size 0 Autosized using max_connections

    http://dev.mysql.com/doc/refman/5.6/en/server-default-changes.html

    二. innodb特性的变化以及增强

    • 1.全文索引(full-text search):https://dev.mysql.com/doc/refman/5.6/en/innodb-fulltext-index.html

    • 2.支持 online DDL:https://dev.mysql.com/doc/refman/5.6/en/innodb-online-ddl.html

    • 3.独立表空间的.ibd文件可以在建表时指定目录: http://dev.mysql.com/doc/refman/5.6/en/tablespace-placing.html

    • 4.导入和导出表空间: http://dev.mysql.com/doc/refman/5.6/en/tablespace-copying.html

    • 5. 新增参数innodb_page_size设置页大小(4k,8k,16k): https://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html

    • 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.支持read-only事务:http://dev.mysql.com/doc/refman/5.6/en/innodb-performance.html

    • 9.undo log可独立出系统表空间:http://dev.mysql.com/doc/refman/5.6/en/innodb-performance.html

    • 10.redo log最大增至512G。http://dev.mysql.com/doc/refman/5.6/en/innodb-redo-log-size-increase.html

    • 11.innodb支持read_only介质,如DVD,参数--innodb-readonly http://dev.mysql.com/doc/refman/5.6/en/innodb-parameters.html

    • 12.innodb内部性能增强:包括将flushing操作独立出主线程,减少核心互斥锁,可设置多个清除线程,减少大内存系统的资源争夺。

    • 13.检测死锁算法增强,在非递归情况下死锁检测,死锁信息可以记录到 error 日志,方便分析。

    • 14.buffer pool预热:http://dev.mysql.com/doc/refman/5.6/en/innodb-performance.html

    三. 分区的限制(Restrictions and Limitations on Partitioning)

    • 1.最大分区个数增为8192,包括分区和子分区。(Prior to MySQL 5.6.7, the maximum possible number of partitions for a given table not using the NDB storage engine was 1024)

    • 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

    • 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)。

    七. 更改的参数

    • 1. --log和log移除,用 --general_log 和 --general_log_file=file_name 替换。

    • 2. log_slow_queries移除,只有slow_query_log。

    • 3. --one-thread系统参数移除,用 --thread_handling=no-threads 替换。

    • 4. --safe-mode 系统参数移除。

    • 5. --skip-thread-priority系统参数移除。

    • 6. --table-cache 用 table_open_cache 替换。

    • 7. --init-rpl-role、--rpl-recovery-rank、rpl_recovery_rank、Rpl_status移除。

    • 8. engine_condition_pushdown系统变量移除,engine_condition_pushdown表示并入optimizer_switch 变量。

    • 9. have_csv, have_innodb, have_ndbcluster, have_partitioning移除,用show engines代替。

    • 10. sql_big_tables移除,用big_tables 代替。

    • 11. sql_low_priority_updates被low_priority_updates 代替。

    • 12. sql_max_join_size被max_join_size 代替。

    • 13. max_long_data_size被max_allowed_packet 代替。

    • 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移除。

    http://dev.mysql.com/doc/refman/5.6/en/server-system-variables.html

    八. 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聚合总结。

    以上特性在mysql官网上全部可以找到、

    参考文章

    http://blog.csdn.net/yueliangdao0608/article/details/21230627

  • 相关阅读:
    socket阻塞与非阻塞,同步与异步
    Python列表切成多个/生成多个空列表
    virtualbox 下windows与虚拟机实现文件共享---挂载
    centos安装mysql
    centos安装Python2.7
    在遍历或者迭代过程中对集合进行增删 都会发生异常(迭代器的并发异常)
    List
    LinkedList
    增强for循环
    Collection中的迭代器
  • 原文地址:https://www.cnblogs.com/chenpingzhao/p/6582177.html
Copyright © 2011-2022 走看看