当前位置:网站首页>华为云专家详解GaussDB(for MySQL)新特性
华为云专家详解GaussDB(for MySQL)新特性
2022-07-01 18:38:00 【InfoQ】

- Query cache针对单个查询,任何一个表做了修改,如果影响到结果集就需要刷新或者失效。
- Query cache对隔离级别有依赖,不同的隔离级别产生的结果集不一样。
- Query cache需要对所有数据进行缓存,如果表结果比较大的话,缓存需要占据较大的内存或者写入磁盘。

PTRC如何确定对算子并加速?
PTRC是如何工作的?
SELECT *
FROM t1
WHERE t1.a IN (SELECT a
FROM t2,
t3
WHERE t2.b = t1.b
AND t2. c > t3.d); 
EXPLAIN format=tree
SELECT *
FROM t1
WHERE t1.a IN (SELECT a
FROM t2,
t3
WHERE t2.b = t1.b
AND t2. c > t3.d);-> Filter: <in_optimizer>(t1.a,<exists>(select #2)) (cost=0.35 rows=1)
-> Table scan on t1 (cost=0.35 rows=1)
-> Select #2 (subquery in condition; dependent)
-> Result cache : cache keys(t1.a, t1.b)
-> Limit: 1 row(s) (cost=0.80 rows=1)
-> Filter: (t2.c > t3.d) (cost=0.80 rows=1)
-> Inner hash join (no condition) (cost=0.80 rows=1)
-> Table scan on t3 (cost=0.35 rows=2)
-> Hash
-> Filter: ((t2.b = t1.b) and (<cache>(t1.a) = t2.a)) (cost=0.35 rows=1)
-> Table scan on t2 (cost=0.35 rows=1)
优化器如何选择PTRC?
EXPLAIN analyze
SELECT *
FROM t1
WHERE t1.a IN (SELECT a
FROM t2,
t3
WHERE t2.b = t1.b
AND t2. c > t3.d);-> Filter: <in_optimizer>(t1.a,<exists>(select #2)) (cost=0.35 rows=1) (actual time=3800.595..3800.595 rows=0 loops=1)
-> Table scan on t1 (cost=0.35 rows=1) (actual time=0.064..0.093 rows=1 loops=1)
-> Select #2 (subquery in condition; dependent)
-> Result cache : cache keys(t1.a, t1.b) (Cache Hits: 0, Cache Misses:1, Cache Evictions: 0, Cache Overflows: 0, Memory Usage: 40960 ) (actual time=0.115..0.115 rows=0 loops=1)
-> Limit: 1 row(s) (cost=0.80 rows=1) (actual time=0.094..0.094 rows=0 loops=1)
-> Filter: (t2.c > t3.d) (cost=0.80 rows=1) (actual time=0.093..0.093 rows=0 loops=1)
-> Inner hash join (no condition) (cost=0.80 rows=1) (actual time=0.092..0.092 rows=0 loops=1)
-> Table scan on t3 (cost=0.35 rows=2) (never executed)
-> Hash
-> Filter: ((t2.b = t1.b) and (<cache>(t1.a) = t1.a)) (cost=0.35 rows=1) (actual time=0.039..0.039 rows=0 loops=1)
-> Table scan on t2 (cost=0.35 rows=1) (actual time=0.038..0.038 rows=0 loops=1)- Cache Hits: 0,表示命中的次数为0
- Cache Misses:1,表示没有命中的次数为1
- Cache Evictions: 0,表示使用LRU淘汰的记录数
- Cache Overflows: 0,表示内存overflow的次数
- Memory Usage: 40960,表示当前查询使用的内存量
优化器如何限制PTRC的内存使用
PTRC如何配置?

PTRC性能测试


边栏推荐
- How to find the optimal learning rate
- R language ggplot2 visualization: gganimate creates a dynamic histogram animation (GIF), and displays the histogram and enter step by step along a given dimension in the animation_ Growth function and
- Lumiprobe Lumizol RNA 提取试剂解决方案
- Lumiprobe非荧光炔烃丨EU(5-乙炔基尿苷)
- 实现一个Prometheus exporter
- [source code analysis] model parallel distributed training Megatron (5) -- pipestream flush
- [today in history] February 15: Pascal's father was born; YouTube was founded; Kotlin language comes out
- 2020,最新手机号码手机验证正则表达式,持续更新
- Mise en place d'une plate - forme générale de surveillance et d'alarme, quelles sont les conceptions nécessaires dans l'architecture?
- Unity learning fourth week
猜你喜欢

2、《创建您自己的NFT集合并发布一个Web3应用程序来展示它们》启动并运行您的本地环境

Lumiprobe 生物分子定量丨QuDye 蛋白定量试剂盒

Why do independent website sellers start to do social media marketing? The original customer conversion rate can be improved so much!

The 13th simulation problem of the single chip microcomputer provincial competition of the Blue Bridge Cup

About enterprise middle office planning and it architecture microservice transformation

Vidéos courtes recommandées chaque semaine: méfiez - vous de la confusion entre « phénomène » et « problème »

Relational database management system of easyclick
![[source code analysis] model parallel distributed training Megatron (5) -- pipestream flush](/img/c0/25c1b96cc56fbd0231d32214d66718.jpg)
[source code analysis] model parallel distributed training Megatron (5) -- pipestream flush

A database editing gadget that can edit SQLite database. SQLite database replaces fields. SQL replaces all values of a field in the database

Leetcode203 移除链表元素
随机推荐
A database editing gadget that can edit SQLite database. SQLite database replaces fields. SQL replaces all values of a field in the database
因子分析怎么计算权重?
R语言使用epiDisplay包的tableStack函数制作统计汇总表格(基于目标变量分组的描述性统计、假设检验等)、不设置by参数则计算数据框指定数据列范围的基础描述性统计信息
Livedata postvalue will "lose" data
Principal component calculation weight
Privacy sandbox is finally coming
Cloud computing - make learning easier
Lumiprobe 双功能交联剂丨Sulfo-Cyanine5 双-NHS 酯
为什么独立站卖家都开始做社交媒体营销?原来客户转化率能提高这么多!
Navicat Premium 15 永久破解和2021版本最新IDEA破解(亲测有效)
Five degrees easy chain enterprise app is newly upgraded
Write an open source, convenient and fast database document query and generation tool with WPF
PMP daily three questions (February 15, 2022)
Rust language - cargo, crates io
Leetcode-141环形链表
Force buckle day33
Sum of three numbers
如何运营好技术相关的自媒体?
540. Single element in ordered array
Reading notes series "modern methods of C language programming" -- Chapter 2