Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.1.19, 10.1.24, 10.1(EOL), 10.2(EOL)
-
None
-
10.2.10
Description
Querying INFORMATION_SCHEMA repeatedly using CentOS 6 becomes slow in MariaDB 10.1 (10.1.19, 10.1.24).
With a basic table, and simple repeated SELECT from I_S, on CentOS 6, thus far, we see a slowdown. It remains sub-second from my testing on Windows, even up to 2K iterations.
I will provide the CREATE TABLE and test case in a private comment.
Here are a sample of times from 10.1.19 (compared to times on MySQL 5.5 and 5.6) on CentOS 6.8:
MariaDB 10.1.19
|
real 0m16.970s
|
user 0m2.804s
|
sys 0m0.303s
|
|
MySQL 5.6.16
|
real 0m11.291s
|
user 0m2.331s
|
sys 0m0.280s
|
|
MySQL 5.5.36
|
real 0m7.246s
|
user 0m2.349s
|
sys 0m0.277s
|
And here are times from Elena (10.1.24 on CentOS 6.2) using test case provided:
real 0m4.699s
|
user 0m1.641s
|
sys 0m2.590s
|
This latter one is faster than the first one, but still not sub-second.
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
Querying INFORMATION_SCHEMA repeatedly using CentOS 6 becomes slow in MariaDB 10.1 (10.1.19, 10.1.24).
With a basic table, and simple repeated SELECT from I_S, on CentOS 6, thus far, we see a slowdown. It remains sub-second from my testing on Windows, even up to 2K iterations. I will provide the CREATE TABLE and test case in a private comment. |
Querying INFORMATION_SCHEMA repeatedly using CentOS 6 becomes slow in MariaDB 10.1 (10.1.19, 10.1.24).
With a basic table, and simple repeated SELECT from I_S, on CentOS 6, thus far, we see a slowdown. It remains sub-second from my testing on Windows, even up to 2K iterations. I will provide the CREATE TABLE and test case in a private comment. Here are a sample of times from 10.1.19 (compared to times on MySQL 5.5 and 5.6) on CentOS 6.8: {code} MariaDB 10.1.19 real 0m16.970s user 0m2.804s sys 0m0.303s MySQL 5.6.16 real 0m11.291s user 0m2.331s sys 0m0.280s MySQL 5.5.36 real 0m7.246s user 0m2.349s sys 0m0.277s {code} And here are times from Elena (10.1.24 on CentOS 6.2) using test case provided: {code} real 0m4.699s user 0m1.641s sys 0m2.590s {code} This latter one is faster than the first one, but still not sub-second. |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Fix Version/s | 10.1 [ 16100 ] | |
Assignee | Sergei Golubchik [ serg ] |
Fix Version/s | 10.2 [ 14601 ] | |
Affects Version/s | 10.1 [ 16100 ] | |
Affects Version/s | 10.2 [ 14601 ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Sprint | 10.2.10 [ 183 ] |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Summary | Querying INFORMATION_SCHEMA repeatedly using CentOS 6 becomes slow in MariaDB 10.1 (10.1.19, 10.1.24) | Querying INFORMATION_SCHEMA repeatedly using CentOS 6 becomes slow in MariaDB 10.1 |
Summary | Querying INFORMATION_SCHEMA repeatedly using CentOS 6 becomes slow in MariaDB 10.1 | Querying INFORMATION_SCHEMA becomes slow in MariaDB 10.1 |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Component/s | Admin statements [ 11400 ] | |
Fix Version/s | 10.1.29 [ 22636 ] | |
Fix Version/s | 10.2.10 [ 22615 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Assignee | Sergei Golubchik [ serg ] | Alexander Barkov [ bar ] |
Resolution | Fixed [ 1 ] | |
Status | Closed [ 6 ] | Stalled [ 10000 ] |
Assignee | Alexander Barkov [ bar ] | Sergei Golubchik [ serg ] |
Fix Version/s | 10.3.3 [ 22644 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Resolution | Fixed [ 1 ] | |
Status | Closed [ 6 ] | Stalled [ 10000 ] |
Labels | need_feedback |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Labels | need_feedback |
Workflow | MariaDB v3 [ 81183 ] | MariaDB v4 [ 152304 ] |
Zendesk Related Tickets | 133145 |
I am getting a similar difference between MySQL 5.6.16 and MariaDB 10.1.24 on a local clean installation of CentOS 6.9, using 64-bit release bintars with default settings.
I create 3001 tables in the schema and then run the same query.
Also, i tried to get rid of the client reconnect, to make sure that the slowness is not caused by it.
Here is the SQL to reproduce. It creates and calls a procedure which creates 3000 tables, creates yet another table which we will be searching for, and also creates a procedure which runs the query from I_S 2000 times, and puts the result into a variable (to avoid sending and displaying the result set).
DELIMITER $
BEGIN
WHILE i < 3000
DO
DELIMITER ;
DELIMITER $
BEGIN
WHILE i < 2000
DO
DELIMITER ;
CALL pr_create();
Below is the timing of running the same query from a shell loop, as initially described, and calling the procedure which runs it:
MySQL 5.6.16
time for i in {1..2000}; do bin/mysql -uroot db -BNe "SELECT TABLE_SCHEMA TABLE_CAT, NULL TABLE_SCHEM, TABLE_NAME, TABLE_TYPE, TABLE_COMMENT REMARKS, NULL TYPE_CAT, NULL TYPE_SCHEM, NULL TYPE_NAME, NULL SELF_REFERENCING_COL_NAME, NULL REF_GENERATION FROM INFORMATION_SCHEMA.TABLES WHERE (TABLE_SCHEMA = 'db') AND (TABLE_NAME LIKE 'target_table') ORDER BY TABLE_TYPE, TABLE_SCHEMA, TABLE_NAME"; done
real 0m13.260s
user 0m0.474s
sys 0m1.967s
mysql> call pr_is();
Query OK, 1 row affected (7.29 sec)
mysql> call pr_is();
Query OK, 1 row affected (7.24 sec)
MariaDB 10.1.24
time for i in {1..2000}; do bin/mysql -uroot db -BNe "SELECT TABLE_SCHEMA TABLE_CAT, NULL TABLE_SCHEM, TABLE_NAME, TABLE_TYPE, TABLE_COMMENT REMARKS, NULL TYPE_CAT, NULL TYPE_SCHEM, NULL TYPE_NAME, NULL SELF_REFERENCING_COL_NAME, NULL REF_GENERATION FROM INFORMATION_SCHEMA.TABLES WHERE (TABLE_SCHEMA = 'db') AND (TABLE_NAME LIKE 'target_table') ORDER BY TABLE_TYPE, TABLE_SCHEMA, TABLE_NAME"; done
real 0m19.331s
user 0m0.495s
sys 0m1.962s
MariaDB [db]> call pr_is();
Query OK, 1 row affected (13.13 sec)
MariaDB [db]> call pr_is();
Query OK, 1 row affected (12.86 sec)
MariaDB 10.2.6
time for i in {1..2000}; do bin/mysql -uroot db -BNe "SELECT TABLE_SCHEMA TABLE_CAT, NULL TABLE_SCHEM, TABLE_NAME, TABLE_TYPE, TABLE_COMMENT REMARKS, NULL TYPE_CAT, NULL TYPE_SCHEM, NULL TYPE_NAME, NULL SELF_REFERENCING_COL_NAME, NULL REF_GENERATION FROM INFORMATION_SCHEMA.TABLES WHERE (TABLE_SCHEMA = 'db') AND (TABLE_NAME LIKE 'target_table') ORDER BY TABLE_TYPE, TABLE_SCHEMA, TABLE_NAME"; done
real 0m21.826s
user 0m1.398s
sys 0m3.115s
MariaDB [db]> CALL pr_is();
Query OK, 1 row affected (13.23 sec)
MariaDB [db]> CALL pr_is();
Query OK, 1 row affected (13.16 sec)
MySQL 5.7.17
time for i in {1..2000}; do bin/mysql -uroot db -BNe "SELECT TABLE_SCHEMA TABLE_CAT, NULL TABLE_SCHEM, TABLE_NAME, TABLE_TYPE, TABLE_COMMENT REMARKS, NULL TYPE_CAT, NULL TYPE_SCHEM, NULL TYPE_NAME, NULL SELF_REFERENCING_COL_NAME, NULL REF_GENERATION FROM INFORMATION_SCHEMA.TABLES WHERE (TABLE_SCHEMA = 'db') AND (TABLE_NAME LIKE 'target_table') ORDER BY TABLE_TYPE, TABLE_SCHEMA, TABLE_NAME"; done
real 0m12.444s
user 0m0.454s
sys 0m1.967s
mysql> CALL pr_is();
Query OK, 1 row affected (7.13 sec)
mysql> CALL pr_is();
Query OK, 1 row affected (7.06 sec)