MariaDB newest alpha version Features short VS PostgreSQL 9.3

本文概述了MariaDB 10.1版本的主要新特性,并将其与PostgreSQL的相关功能进行了对比,包括多主复制、SQL分析、JSON格式支持、超时处理、页面压缩等功能。
以下Feature截取自MariaDB 10.1 alpha版本 : 

Features
The following features are already in MariaDB 10.1:
1. MariaDB终于要把Galera同步多主复制加入主版本了. 目前PostgreSQL主版本中没有, 不久会加入BDR, 参见

Galera, a true multi-master solution, is a standard part of MariaDB 10.1.

2. MariaDB终于支持analyze了, 这个postgresql很早已有.
ANALYZE statement provides output that looks like EXPLAIN output, but also is includes data from the query execution (how many rows were actually read, etc).

3. explain支持json格式输出. 这个PostgreSQL早已有(支持json,xml,yaml,text多种格式), 并且支持json,jsonb数据类型.
EXPLAIN FORMAT=JSON is a re-implementation of similar feature in MySQL 5.6
ANALYZE FORMAT=JSON produces detailed information about the statement execution

4. 超时SQL自动退出, 这个PostgreSQL也早已有的功能(statement_timeout), PostgreSQL还支持锁超时(lock_timeout)
MAX_STATEMENT_TIME can be used to automatically abort long running queries. (MDEV-4427).

5. 页压缩, 这个可能是阿里共享的代码?(猜测), 阿里FusionIO用得比较多, 可能会有此需求. PostgreSQL早已支持压缩(变长字段支持选择压缩存储, 或不压缩存储, SET STORAGE { PLAIN | EXTERNAL | EXTENDED | MAIN })
Page compression for FusionIO.

6. 匿名数据块, 这个在PostgreSQL中早已支持, 并且功能更加强大. 见do.
http://www.postgresql.org/docs/9.3/static/sql-do.html

Compound statement / anonymous blocks (MDEV-5317).
IF (…) THEN CREATE TABLE … ; END IF

7. MySQL存储引擎相关, PostgreSQL的外部表和MySQL的存储引擎概念功效类似, 例如支持读写外部数据源, 就如读数据库本地表.(包括Oracle, MySQL, Redis, mongodb, hive, hbase, s3, firebird, file, ......几乎所有数据源) 自行开发插件即可. 
Added variable default-tmp-storage-engine (From MySQL 5.6) (MDEV-6107).

8. 这个在PostgreSQL中早已有.
SET DEFAULT ROLE (MDEV-5210).

9. 无可比性
Don't create frm files for temporary tables (MDEV-4260).

10. PostgreSQL支持最大32K数据块
Allow up to 64K pages in InnoDB (old limit was 16K) (MDEV-6075).

11. 无可比性
mysqld --help --verbose now shows valid variables for ENUM variables. (MDEV-6137)

INFORMATION_SCHEMA.SYSTEM_VARIABLES gives information, like description and value origin, for system variables (MDEV-6138).

12. PostgreSQL union all 即 append, 无排序, 无需临时存储. (MYSQL为何需要临时表来处理union all.)
UNION ALL works without usage of a temporary table (MDEV-334). The feature was backported from MySQL 5.7

13. 每个查询设置不同的变量, SET STATEMENT max_statement_time=1000 FOR SELECT name FROM name ORDER BY name;
目前在PostgreSQL中, 支持事务级别, 会话级别, 用户级别, 数据库级别, 数据库+用户级别, 全局参数. 但是没有针对单个SQL设置参数的. 
个人点评:
不过觉得这个针对单SQL设置参数的功能有点鸡肋, 如果对数据,SQL不了解的话, 设置错误可能导致性能问题. 
还是设置靠谱的成本因子吧, 合理的成本因子下优化器选择的才是正确的.
另外, 如果要靠这个来限制资源使用(如SQL超时, BUFFER使用), 还不如规划好用户和角色功能, 针对用户和角色来设置比较靠谱.
Per-query variable statement (MDEV-5231) This is a backport of Per-query Variable Statement feature of Percona Server 5.6, with many bugs fixed.

14. 无可比性
Improvements
Don't create .frm files for temporary tables (MDEV-4260).

15. PostgreSQL在性能分析这块支持io time, cpu time, cache util, SQL, table, index, 等非常细化的统计.
Automatic discovery of performance schema tables (simpler mysql_install_db code). (MDEV-4262).

在互联网行业PostgreSQL没有MySQL流行, 可能和国语和英语的差别, 普及度而已, 和功能, 性能没什么太大的关系.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值