上篇文章 中,我们简单介绍了 TiFlash 的设计和架构,TiFlash 是即将随着 TiDB 3.1 版本发布(3月)的列存引擎,大幅提升了 TiDB 在实时分析场景下的性能。同时和 TiDB 体系无缝结合,可实时更新,弹性扩展,保持 TiDB 的 ACID 事务特性和快照隔离级别,可用于严肃场景的实时分析。
那么 TiFlash 到底有多快?


注:为了不影响比例,上图忽略了 MySQL 和 Oracle 数据。
相对 MySQL 而言,单机环境下可达到数百倍提升(更不用提 TiFlash 可扩展); 而对比 MPP 数据库或者新 MariaDB ColumnStore 等无法实时更新的分析型数据库 引擎,仍然可达数倍乃至十倍的性能提升。
select avg(c1) from
( select year, month, count(*) as c1 from ontime group by year, month ) A;复制
select dayofweek, count(*) as c from ontime
where year>=2000 and year<=2008 group by dayofweek
order by c desc;复制
select dayofweek, count(*) as c from ontime
where depdelay>10 and year>=2000 and year<=2008 group by dayofweek order by c desc;复制
select origin, count(*) as c from ontime
where depdelay>10 and year>=2000 and year<=2008 group by origin order by c desc limit 10;复制
select carrier, count(*) from ontime
where depdelay>10 and year=2007 group by carrier
order by count(*) desc;复制
select carrier, c, c2, c*100/c2 as c3 from
(select carrier, count(*) as c from ontime where depdelay>10 and year=2007 group by carrier ) A
inner join
( select carrier, count(*) as c2 from ontime where year=2007 group by carrier ) B using (carrier)
order by c3 desc;复制
select carrier, c, c2, c*100/c2 as c3 from
( select carrier, count(*) as c from ontime where depdelay>10 and year>=2000 and year<=2008 group by carrier ) A
inner join
( select carrier, count(*) as c2 from ontime where year>=2000 and year<=2008 group by carrier ) B using (carrier)
order by c3 desc;复制
select year, c1/c2 from ( select year, count(*)*100 as c1 from ontime where depdelay>10 group by year ) A
inner join
( select year, count(*) as c2 from ontime group by year ) B using (year)
order by year;复制
select year, count(*) as c1 from ontime
group by year;复制
select min(year), max(year), carrier, count(*) as cnt, sum(arrdelayminutes>30) as flights_delayed, round(sum(arrdelayminutes>30)/count(*),2) as rate from ontime
where dayofweek not in (6,7) and originstate not in ('ak', 'hi', 'pr', 'vi') and deststate not in ('ak', 'hi', 'pr', 'vi') and flightdate < '2010-01-01'
group by carrier having cnt>100000 and max(year)>1990
order by rate desc limit 1000;复制
真 · 行列混合
mysql> select count(*) from ontime where 1845 = CRSDepTime;
+----------+
| count(*) |
+----------+
| 766539 |
+----------+
1 row in set (0.09 sec)复制
更快的数据到达
何不试试看?
附本文测试环境
由于部分测试对象不支持集群模式,测试环境为单机(但是借助 TiDB 的可扩展体系,TiFlash 也可以进行无缝线性扩展)。测试机规格和配置如下:
CPU: 40 vCores, Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz @ 1268.383 MHz
Mem: 188G @ 2133 MHz
1 x NVMe SSD 3.6T
OS: centos-release-7-6.1810.2.el7.centos.x86_64
Filesystem: ext4
TiKV Region Size: 512M
Greenplum 16 Segments (DISTRIBUTED RANDOMLY)
Oracle noparallel

最后修改时间:2020-02-13 09:21:54
文章转载自PingCAP,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
相关阅读
【纯干货】Oracle 19C RU 19.27 发布,如何快速升级和安装?
Lucifer三思而后行
709次阅读
2025-04-18 14:18:38
Oracle RAC 一键安装翻车?手把手教你如何排错!
Lucifer三思而后行
637次阅读
2025-04-15 17:24:06
Oracle数据库一键巡检并生成HTML结果,免费脚本速来下载!
陈举超
549次阅读
2025-04-20 10:07:02
【活动】分享你的压箱底干货文档,三篇解锁进阶奖励!
墨天轮编辑部
496次阅读
2025-04-17 17:02:24
【ORACLE】你以为的真的是你以为的么?--ORA-38104: Columns referenced in the ON Clause cannot be updated
DarkAthena
493次阅读
2025-04-22 00:13:51
【ORACLE】记录一些ORACLE的merge into语句的BUG
DarkAthena
491次阅读
2025-04-22 00:20:37
一页概览:Oracle GoldenGate
甲骨文云技术
471次阅读
2025-04-30 12:17:56
火焰图--分析复杂SQL执行计划的利器
听见风的声音
419次阅读
2025-04-17 09:30:30
3月“墨力原创作者计划”获奖名单公布
墨天轮编辑部
373次阅读
2025-04-15 14:48:05
OR+DBLINK的关联SQL优化思路
布衣
361次阅读
2025-05-05 19:28:36