-
-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: slow-SQL-Q16-when subquery use not like and not in sql on 10GB data spend too much time #331
Comments
摘要: 运行统计: 耗时: explain执行计划分析: mysql> explain select 火焰图: |
对比mysql/innodb 摘要: 硬件环境:
explain分析: mysql> explain select *************************** 1. row *************************** 耗时: supplier_cnt: 4 热力图: |
摘要: 分析: 火焰图: 分析:
日志埋点: [2022-08-09 21:58:35.661551] [61425] [INFO] [temp_table.cpp:2043] MSG: Timer 0.006423 : TempTable::Materialize over 核心函数: AggregationAlgorithm::MultiDimensionalDistinctScan void AggregationAlgorithm::MultiDimensionalDistinctScan(GroupByWrapper &gbw, MIIterator &mit) {
} |
Describe the problem
`
select
p_brand,
p_type,
p_size,
count(distinct ps_suppkey) as supplier_cnt
from
partsupp,
part
where
p_partkey = ps_partkey
and p_brand <> 'Brand#45'
and p_type not like 'MEDIUM POLISHED%'
and p_size in (49, 14, 23, 45, 19, 3, 36, 9)
and ps_suppkey not in (
select
s_suppkey
from
supplier
where
s_comment like '%Customer%Complaints%'
)
group by
p_brand,
p_type,
p_size
order by
supplier_cnt desc,
p_brand,
p_type,
p_size;
`
Expected behavior
No response
How To Reproduce
No response
Environment
No response
Are you interested in submitting a PR to solve the problem?
The text was updated successfully, but these errors were encountered: