[MDEV-30387] The performance of this sql in high concurrency test is poor Created: 2023-01-12 Updated: 2023-01-12 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Server |
| Affects Version/s: | 10.4.25 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | s | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
os: centos 7.4 |
| Comments |
| Comment by s [ 2023-01-12 ] |
|
I do the same test on mysql, the performance is good, but mariadb performance is bad. |
| Comment by s [ 2023-01-12 ] |
| Comment by s [ 2023-01-12 ] |
|
when run performance, exec query, it cost 11.753s: |
| Comment by Daniel Black [ 2023-01-12 ] |
|
Which MySQL version was your test comparison? Can you include EXPLAIN {query on both the MySQL and MariaDB case? As images I"m having trouble seeing the difference between the two queries. Can you clarify this as text please. How much of your table matches f_type=3? And f_accessor_id in ...? What is in ANALYZE FORMAT=JSON query |
| Comment by s [ 2023-01-12 ] |
|
mysql version: 5.7.25 two querys is same: select f_doc_id, bit_or(case f_type when 1 then f_perm_value else 0 end) denyvalue, bit_or(case f_type when 2 then f_perm_value else 0 end) allowvalue, bit_or(case f_type when 3 then 1 else 0 end) disable_inherit from t_acs_test where ( f_type=3 or f_accessor_id in ('502af418-a102-11ec-9ba0-965ca20af9fc','c863e4cc-a101-11ec-9ba0-965ca20af9fc','cb18b846-a101-11ec-9ba0-965ca20af9fc','cb756816-a101-11ec-9ba0-965ca20af9fc','cc62c070-a101-11ec-9ba0-965ca20af9fc') ) group by f_doc_id the table size is 102917 rows, the query return about 3w |
| Comment by s [ 2023-01-12 ] |
|
when not run mysqlslap performance test, analyze format=json result : when run mysqlslap performance test, analyze format=json result : |
| Comment by s [ 2023-01-12 ] |
|
table definition: |