无
本帖最后由 学无止境 于 2023-12-29 20:05 编辑无 对比一下执行计划 explain format=tree 可以的话再提供下:
1、show processlist
2、show engine innodb status\G 王权富贵 发表于 2023-12-28 18:10
对比一下执行计划 explain format=tree
我在重新安装和导入数据,明天发你,我晚上测试一下;卸载greatsql,安装mysql8.0.34 ,同一台服务器,使用同样的数据,运行查询的结果在1秒多点;目前在重新安装greatsql和导入数据; 学无止境 发表于 2023-12-28 21:17
我在重新安装和导入数据,明天发你,我晚上测试一下;卸载greatsql,安装mysql8.0.34 ,同一台服务器,使 ...
greatsql执行:
-> Aggregate: count(0)(cost=2588008.65 rows=1)
-> Nested loop left join(cost=2120734.35 rows=4672743)
-> Index scan on a using index_companyID(cost=485274.30 rows=4672743)
-> Filter: (b.Sys_DeptLevel = 2)(cost=0.25 rows=1)
-> Single-row index lookup on b using PRIMARY (Sys_DeptID=a.Acc_CompanyID)(cost=0.25 rows=1)
学无止境 发表于 2023-12-28 21:34
greatsql执行:
-> Aggregate: count(0)(cost=2588008.65 rows=1)
-> Nested loop left join(cos ...
mysql8.034执行:
-> Aggregate: count(0)(cost=2.39e+6 rows=1)
-> Nested loop left join(cost=1.96e+6 rows=4.31e+6)
-> Index scan on a using index_companyID(cost=450600 rows=4.31e+6)
-> Filter: (b.Sys_DeptLevel = 2)(cost=0.25 rows=1)
-> Single-row index lookup on b using PRIMARY (Sys_DeptID=a.Acc_CompanyID)(cost=0.25 rows=1)
KAiTO 发表于 2023-12-28 18:19
可以的话再提供下:
1、show processlist
2、show engine innodb status\G
show processlist:
| Id| User | Host | db | Command | Time | State | Info | Time_ms | Rows_sent | Rows_examined |
+-----+-----------------+---------------------+--------------------+---------+------+------------------------+------------------------------------------------------------------------------------------------------+---------+-----------+---------------+
| 8 | event_scheduler | localhost | NULL | Daemon| 2298 | Waiting on empty queue | NULL | 2297217 | 0 | 0 |
| 292 | root | 172.16.224.81:64748 | baiduzx_project | Sleep |454 | | NULL |453909 | 17 | 264 |
| 355 | root | 172.16.224.81:57173 | information_schema | Sleep |354 | | NULL |353411 | 0 | 0 |
| 383 | root | localhost | baiduzx_project | Query | 0 | init | show processlist | 0 | 0 | 0 |
| 392 | root | localhost | baiduzx_project | Query | 3 | executing | SELECT COUNT(*) FROM(selecta.Acc_authorize ,a.Acc_SF_FirstName ,a.Acct_Cust_Name ,a.ID,a.Acc_ISTop | 2638 | 0 | 0 |
+-----+-----------------+---------------------+--------------------+---------+------+----
show engine innodb status\G:
I/O sum:cur, unzip sum:cur
---BUFFER POOL 61
Buffer pool size 81915
Buffer pool size, bytes 1342095360
Free buffers 4000
Database pages 77915
Old database pages 28741
Modified db pages0
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 1210, not young 235385
0.00 youngs/s, 0.00 non-youngs/s
Pages read 300, created 111123, written 162805
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
Buffer pool hit rate 1000 / 1000, young-making rate 0 / 1000 not 0 / 1000
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 77915, unzip_LRU len: 0
I/O sum:cur, unzip sum:cur
---BUFFER POOL 62
Buffer pool size 81915
Buffer pool size, bytes 1342095360
Free buffers 4000
Database pages 77915
Old database pages 28741
Modified db pages0
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 930, not young 171179
0.00 youngs/s, 0.00 non-youngs/s
Pages read 131, created 104693, written 159256
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
No buffer pool page gets since the last printout
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 77915, unzip_LRU len: 0
I/O sum:cur, unzip sum:cur
---BUFFER POOL 63
Buffer pool size 81915
Buffer pool size, bytes 1342095360
Free buffers 4000
Database pages 77915
Old database pages 28741
Modified db pages0
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages made young 1047, not young 180376
0.00 youngs/s, 0.00 non-youngs/s
Pages read 279, created 110115, written 164332
0.00 reads/s, 0.00 creates/s, 0.00 writes/s
No buffer pool page gets since the last printout
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 77915, unzip_LRU len: 0
I/O sum:cur, unzip sum:cur
--------------
ROW OPERATIONS 学无止境 发表于 2023-12-28 21:50
show processlist:
| Id| User | Host | db | Command | ...
1、MySQL和GreatSQL除了PQ外,其他的配置选项都一样吗
2、这条SQL在MySQL和GreatSQL反复多次执行,都是1秒 vs 12秒的差距吗
3、GreatSQL选用的哪个版本
yejr 发表于 2023-12-29 09:18
1、MySQL和GreatSQL除了PQ外,其他的配置选项都一样吗
2、这条SQL在MySQL和GreatSQL反复多次执行,都是1秒 ...
1、配置基本上一样;
2、反复测试了10几次,都是一样;
3、GreatSQL用的是最新版本8.0.32-25 yejr 发表于 2023-12-29 09:18
1、MySQL和GreatSQL除了PQ外,其他的配置选项都一样吗
2、这条SQL在MySQL和GreatSQL反复多次执行,都是1秒 ...
1、配置基本上一样;
2、反复测试了10几次,都是一样;
3、GreatSQL用的是最新版本8.0.32-25
页:
[1]
2