Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Won't Fix
-
10.1.26, 10.0.32
-
None
-
GNU/Linux Debian 8 Jessie
GNU/Linux Debian 9 stretch
Description
Hello
I have just applied the PTI patch on the OS and it is causing a massive difference in the execution time of a specific query.
Disabling and reenabling PTI enables me to reproduce the difference at will :
PTI disabled : 7s
PTI enabled : 87s
The query :
SELECT * FROM `test` as b1 WHERE b1.`dateFin` > '2018-01-24' AND NOT EXISTS (SELECT 1 FROM `test` as b2 WHERE b2.`ip` = b1.`ip` AND b2.`dateFin` > b1.`dateFin`); |
Explain doesn't help much :
+------+--------------------+-------+------+---------------+------+---------+------+------+-------------+
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
|
+------+--------------------+-------+------+---------------+------+---------+------+------+-------------+
|
| 1 | PRIMARY | b1 | ALL | NULL | NULL | NULL | NULL | 4499 | Using where |
|
| 2 | DEPENDENT SUBQUERY | b2 | ALL | NULL | NULL | NULL | NULL | 4499 | Using where |
|
+------+--------------------+-------+------+---------------+------+---------+------+------+-------------+
|
Can't see any report matching that kind of difference so far so i'm wondering what's up
Attachments
Issue Links
- relates to
-
MDEV-15163 Massive performance impact after PTI fix 2
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Description |
Hello
I have just applied the PTI patch on the OS and it is causing a massive difference in the execution time of a specific query. Disabling and reenabling PTI enables me to reproduce the difference at will : PTI disabled : 7s PTI enabled : 87s The query : SELECT * FROM `blacklist` as b1 WHERE b1.`dateFin` > '2018-01-24' AND NOT EXISTS (SELECT 1 FROM `blacklist` as b2 WHERE b2.`ip` = b1.`ip` AND b2.`dateFin` > b1.`dateFin`); Explain doesn't help much : +------+--------------------+-------+------+---------------+------+---------+------+------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +------+--------------------+-------+------+---------------+------+---------+------+------+-------------+ | 1 | PRIMARY | b1 | ALL | NULL | NULL | NULL | NULL | 4499 | Using where | | 2 | DEPENDENT SUBQUERY | b2 | ALL | NULL | NULL | NULL | NULL | 4499 | Using where | +------+--------------------+-------+------+---------------+------+---------+------+------+-------------+ Can't see any report matching that kind of difference so far so i'm wondering what's up |
Hello
I have just applied the PTI patch on the OS and it is causing a massive difference in the execution time of a specific query. Disabling and reenabling PTI enables me to reproduce the difference at will : PTI disabled : 7s PTI enabled : 87s The query : {code:sql} SELECT * FROM `blacklist` as b1 WHERE b1.`dateFin` > '2018-01-24' AND NOT EXISTS (SELECT 1 FROM `blacklist` as b2 WHERE b2.`ip` = b1.`ip` AND b2.`dateFin` > b1.`dateFin`); {code} Explain doesn't help much : {noformat} +------+--------------------+-------+------+---------------+------+---------+------+------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +------+--------------------+-------+------+---------------+------+---------+------+------+-------------+ | 1 | PRIMARY | b1 | ALL | NULL | NULL | NULL | NULL | 4499 | Using where | | 2 | DEPENDENT SUBQUERY | b2 | ALL | NULL | NULL | NULL | NULL | 4499 | Using where | +------+--------------------+-------+------+---------------+------+---------+------+------+-------------+ {noformat} Can't see any report matching that kind of difference so far so i'm wondering what's up |
Affects Version/s | 10.1.26 [ 22553 ] | |
Environment | GNU/Linux Debian 8 Jessie |
GNU/Linux Debian 8 Jessie
GNU/Linux Debian 9 stretch |
Assignee | Axel Schwenke [ axel ] |
Attachment | cossi-ip.sql.gz [ 45016 ] |
Comment |
[ exactly the same output on the execution plan with and without KPTI
Here are the tables (attached to this ticket) if you want to reproduce the problem [^cossi-ip.sql.gz] ] |
Attachment | cossi-ip.sql.gz [ 45016 ] |
Description |
Hello
I have just applied the PTI patch on the OS and it is causing a massive difference in the execution time of a specific query. Disabling and reenabling PTI enables me to reproduce the difference at will : PTI disabled : 7s PTI enabled : 87s The query : {code:sql} SELECT * FROM `blacklist` as b1 WHERE b1.`dateFin` > '2018-01-24' AND NOT EXISTS (SELECT 1 FROM `blacklist` as b2 WHERE b2.`ip` = b1.`ip` AND b2.`dateFin` > b1.`dateFin`); {code} Explain doesn't help much : {noformat} +------+--------------------+-------+------+---------------+------+---------+------+------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +------+--------------------+-------+------+---------------+------+---------+------+------+-------------+ | 1 | PRIMARY | b1 | ALL | NULL | NULL | NULL | NULL | 4499 | Using where | | 2 | DEPENDENT SUBQUERY | b2 | ALL | NULL | NULL | NULL | NULL | 4499 | Using where | +------+--------------------+-------+------+---------------+------+---------+------+------+-------------+ {noformat} Can't see any report matching that kind of difference so far so i'm wondering what's up |
Hello
I have just applied the PTI patch on the OS and it is causing a massive difference in the execution time of a specific query. Disabling and reenabling PTI enables me to reproduce the difference at will : PTI disabled : 7s PTI enabled : 87s The query : {code:sql} SELECT * FROM `test` as b1 WHERE b1.`dateFin` > '2018-01-24' AND NOT EXISTS (SELECT 1 FROM `test` as b2 WHERE b2.`ip` = b1.`ip` AND b2.`dateFin` > b1.`dateFin`); {code} Explain doesn't help much : {noformat} +------+--------------------+-------+------+---------------+------+---------+------+------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +------+--------------------+-------+------+---------------+------+---------+------+------+-------------+ | 1 | PRIMARY | b1 | ALL | NULL | NULL | NULL | NULL | 4499 | Using where | | 2 | DEPENDENT SUBQUERY | b2 | ALL | NULL | NULL | NULL | NULL | 4499 | Using where | +------+--------------------+-------+------+---------------+------+---------+------+------+-------------+ {noformat} Can't see any report matching that kind of difference so far so i'm wondering what's up |
Attachment | test.sql.gz [ 45019 ] |
issue.field.resolutiondate | 2018-01-26 16:20:27.0 | 2018-01-26 16:20:27.824 |
Fix Version/s | N/A [ 14700 ] | |
Resolution | Cannot Reproduce [ 5 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Attachment | test.sql.gz [ 45129 ] |
Link |
This issue relates to |
Resolution | Cannot Reproduce [ 5 ] | |
Status | Closed [ 6 ] | Stalled [ 10000 ] |
Status | Stalled [ 10000 ] | In Progress [ 3 ] |
Component/s | Storage Engine - MyISAM [ 10600 ] | |
Resolution | Won't Fix [ 2 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 85139 ] | MariaDB v4 [ 153651 ] |
Hi Jean-Marc,
could you please check the execution plan (EXPLAIN) with and without KPTI? Such big differences normally only happen when the plan is changed.