[MDEV-27728] Very slow sql execution Created: 2022-02-02  Updated: 2022-02-02

Status: Open
Project: MariaDB Server
Component/s: None
Affects Version/s: 10.4.20
Fix Version/s: None

Type: Bug Priority: Major
Reporter: YUANYUAN LI Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None

Attachments: PNG File image-2022-02-02-14-26-13-694.png     PNG File image-2022-02-02-14-26-35-702.png     PNG File image-2022-02-02-14-26-53-932.png    

 Description   

The SQL that has very long execution time has been uploaded to the MariaDB FTP Server with name slowsql.sql inside the private folder.

Below is our findings:
When running the query and retrieving the top 100 rows, for all the versions,
the query results are returned in approx. 4 sec.

This is a screen-shot for MariaDB 10.4.18:

When running the query and retrieving the top 1000 rows, for all the versions,
the query results are returned in approx. 32 sec.

This is a screen-shot for MariaDB 10.5.9:

When running the query and retrieving the top 10000 rows, the query results are returned in approx 335 sec:

When not limiting the number of rows to be retrieved, it seem to take a long time indeed.
So far, more than 1h has passed and the query is still executing.

The MariaDB config parameters that we use are pretty much the same that we use in the MySQL installs that we run across the board.
Now, when executing this same query on our MySQL instances, with the same config parameters as in MariaDB, w/o limiting the # of rows to be retrieved it takes approx 2 sec.


Generated at Thu Feb 08 09:55:07 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.