当前位置:网站首页>华为云专家详解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性能测试


边栏推荐
- Memo - about C # generating barcode for goods
- R语言使用dplyr包的transmute函数计算dataframe数据中的指定数据列的移动窗口均值、使用ggplot2包可视化移动均值与原始数据的折线图
- Qt中的QFile读写文件操作
- Roll out! Enlightenment!
- C language learning notes: type definition typedef and declaration external CSDN creation punch in
- 2、《创建您自己的NFT集合并发布一个Web3应用程序来展示它们》启动并运行您的本地环境
- Thread forced join, thread forced join application scenarios
- Lumiprobe Lumizol RNA 提取试剂解决方案
- ACM MM 2022视频理解挑战赛视频分类赛道冠军AutoX团队技术分享
- Lumiprobe bifunctional crosslinker sulfo cyanine 5 bis NHS ester
猜你喜欢

Lumiprobe non fluorescent alkyne EU (5-ethynyluridine)

Lumiprobe Lumizol RNA 提取试剂解决方案

Cloud computing - make learning easier

Find all missing numbers in the array

Solution: you can ping others, but others can't ping me

PCL learning materials

Lumiprobe biomolecular quantification - qudye Protein Quantification Kit

Search 2D matrix 2
![[source code analysis] NVIDIA hugectr, GPU version parameter server - (1)](/img/92/f3a70e7086aeedf41eea3eef98b5aa.jpg)
[source code analysis] NVIDIA hugectr, GPU version parameter server - (1)
![[image denoising] matlab code for removing salt and pepper noise based on fast and effective multistage selective convolution filter](/img/bf/f8759195ea67832835e84c851b5e81.jpg)
[image denoising] matlab code for removing salt and pepper noise based on fast and effective multistage selective convolution filter
随机推荐
Leetcode203 移除链表元素
Cloud computing - make learning easier
How to find the optimal learning rate
Database - MySQL advanced SQL statement (I)
Li Kou daily question - Day 32 -589 N × Preorder traversal of tree
R语言epiDisplay包ordinal.or.display函数获取有序logistic回归模型的汇总统计信息(变量对应的优势比及其置信区间、以及假设检验的p值)、write.csv函数保存csv
Lumiprobe lumizol RNA extraction reagent solution
The R language uses the tablestack function of epidisplay package to make statistical summary tables (descriptive statistics based on the grouping of target variables, hypothesis testing, etc.). If th
Force buckle day33
PTA year of birth
Static timing analysis (STA) in ic/fpga design
必看,时间序列分析
Using OpenSSL encryption to rebound shell traffic
Write an open source, convenient and fast database document query and generation tool with WPF
Halcon图片标定,使得后续图片处理过后变成与模板图片一样
2、《创建您自己的NFT集合并发布一个Web3应用程序来展示它们》启动并运行您的本地环境
After studying 11 kinds of real-time chat software, I found that they all have these functions
Why do independent website sellers start to do social media marketing? The original customer conversion rate can be improved so much!
R语言使用epiDisplay包的aggregate函数将数值变量基于因子变量拆分为不同的子集,计算每个子集的汇总统计信息
Search 2D matrix 2