Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
1d5f8f4c
Commit
1d5f8f4c
authored
Sep 22, 2016
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
X .
parent
c7705b64
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
3 deletions
+56
-3
t/stats/NOTES.rst
t/stats/NOTES.rst
+56
-3
No files found.
t/stats/NOTES.rst
View file @
1d5f8f4c
...
@@ -132,3 +132,56 @@ Analysis
...
@@ -132,3 +132,56 @@ Analysis
- Why this happens is question.
- Why this happens is question.
----------------------------------------
After upgrade to MariaDB 10.1.17::
# Time: 160921 10:47:15
# User@Host: root[root] @ localhost []
# Thread_id: 6 Schema: neo1 QC_hit: No
# Query_time: 4.118192 Lock_time: 0.000024 Rows_sent: 0 Rows_examined: 8476058
# Rows_affected: 0
#
# explain: id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra
# explain: 1 SIMPLE obj ref PRIMARY,partition partition 10 const,const 1 8476058.00 100.00 0.00 Using where; Using index
#
SET timestamp=1474447635;
SELECT tid FROM obj WHERE `partition`=5 AND oid=79613 AND tid>268544235197088772 ORDER BY tid LIMIT 1;
# a slow query caught:
MariaDB [neo1]> show processlist;
+----+------+-----------+------+---------+------+----------------------------+------------------------------------------------------------------------------------------------------+----------+
| Id | User | Host | db | Command | Time | State | Info | Progress |
+----+------+-----------+------+---------+------+----------------------------+------------------------------------------------------------------------------------------------------+----------+
| 3 | root | localhost | neo0 | Sleep | 8 | | NULL | 0.000 |
| 4 | root | localhost | neo2 | Sleep | 15 | | NULL | 0.000 |
| 5 | root | localhost | neo3 | Sleep | 11 | | NULL | 0.000 |
| 6 | root | localhost | neo1 | Query | 3 | Queried about 7710000 rows | SELECT tid FROM obj WHERE `partition`=5 AND oid=79613 AND tid>268544341634012678 ORDER BY tid LIMIT | 0.000 |
| 10 | root | localhost | neo1 | Query | 0 | init | show processlist | 0.000 |
+----+------+-----------+------+---------+------+----------------------------+------------------------------------------------------------------------------------------------------+----------+
5 rows in set (0.00 sec)
MariaDB [neo1]> show explain for 6;
+------+-------------+-------+------+-------------------+-----------+---------+-------------+------+------------------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+------+-------------+-------+------+-------------------+-----------+---------+-------------+------+------------------------------------------+
| 1 | SIMPLE | obj | ref | PRIMARY,partition | partition | 10 | const,const | 1 | Using where; Using index; Using filesort |
+------+-------------+-------+------+-------------------+-----------+---------+-------------+------+------------------------------------------+
1 row in set, 1 warning (0.01 sec)
# NOTE the difference:
# * type: 'ref' vs 'range'
# * key_len: 10 vs 18 (partition, oid) vs (partition, oid, tid)
# * ref: const,const vs NULL
# * "Using filesort"
MariaDB [neo1]> explain SELECT tid FROM obj WHERE `partition`=5 AND oid=79613 AND tid>268544341634012678 ORDER BY tid LIMIT 1;
+------+-------------+-------+-------+-------------------+-----------+---------+------+------+--------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+------+-------------+-------+-------+-------------------+-----------+---------+------+------+--------------------------+
| 1 | SIMPLE | obj | range | PRIMARY,partition | partition | 18 | NULL | 24 | Using where; Using index |
+------+-------------+-------+-------+-------------------+-----------+---------+------+------+--------------------------+
1 row in set (0.00 sec)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment