Merge lp:~hrvojem/percona-server/bug1056603-5.1 into lp:percona-server/5.1

Proposed by Hrvoje Matijakovic
Status: Merged
Approved by: Alexey Kopytov
Approved revision: no longer in the source branch.
Merged at revision: 496
Proposed branch: lp:~hrvojem/percona-server/bug1056603-5.1
Merge into: lp:percona-server/5.1
Diff against target: 581 lines (+243/-143)
8 files modified
doc/source/diagnostics/innodb_stats.rst (+46/-29)
doc/source/diagnostics/misc_info_schema_tables.rst (+123/-44)
doc/source/diagnostics/response_time_distribution.rst (+7/-23)
doc/source/diagnostics/user_stats.rst (+25/-29)
doc/source/index.rst (+1/-1)
doc/source/index_info_schema_tables.rst (+31/-17)
doc/source/management/innodb_lru_dump_restore.rst (+9/-0)
doc/source/performance/innodb_opt_lru_count.rst (+1/-0)
To merge this branch: bzr merge lp:~hrvojem/percona-server/bug1056603-5.1
Reviewer Review Type Date Requested Status
Alexey Kopytov (community) Approve
Review via email: mp+134478@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Hrvoje,

Few comments:

- There's a difference between internal InnoDB tables naming and the
  corresponding I_S tables exposing those internal tables. That is, the
  internal InnoDB tables are called SYS_STATS, SYS_TABLES and
  SYS_INDEXES, while their user-visible I_S counterparts have the
  INNODB_ prefix: INNODB_SYS_STATS, INNODB_SYS_TABLES and
  INNODB_SYS_INDEXES.

So it is technically incorrect to say that "If this option is enabled,
|XtraDB| uses the :table:`INNODB_SYS_STATS` system table to store
statistics of table indexes". It actually uses SYS_STATS, as correctly
described now.

- the patch adds INNODB_SYS_TABLES and INNODB_SYS_INDEXES which is good,
  but it only describes their structure without providing any further
  info, which is not that good :)

- s/the index haven't been used/the index has not been used/

review: Needs Fixing
Revision history for this message
Alexey Kopytov (akopytov) wrote :

Hrvoje,

Please use my descriptions of the SPACE_ID, PAGE_NO, LRU_POSITION, FIX_COUNT and ACCESS_TIME fields that I have provided in https://code.launchpad.net/~hrvojem/percona-server/bug1056603-5.5/+merge/134998 for all tables, including INFORMATION_SCHEMA.INNODB_BUFFER_POOL_PAGES.

review: Needs Fixing
Revision history for this message
Alexey Kopytov (akopytov) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'doc/source/diagnostics/innodb_stats.rst'
--- doc/source/diagnostics/innodb_stats.rst 2012-05-29 18:31:23 +0000
+++ doc/source/diagnostics/innodb_stats.rst 2012-12-10 14:05:32 +0000
@@ -6,14 +6,6 @@
66
7This feature provides new startup options (control method and collection of index statistics estimation) and information schema views to confirm the statistics.7This feature provides new startup options (control method and collection of index statistics estimation) and information schema views to confirm the statistics.
88
9This implements the fix for `MySQL Bug #30423 <http://bugs.mysql.com/bug.php?id=30423>`_.
10
11Version Specific Information
12============================
13
14 * 5.5.8-20.0:
15 Renamed three fields in table ``INNODB_INDEX_STATS``.
16
179
18System Variables10System Variables
19================11================
@@ -30,7 +22,7 @@
30 :default: ``nulls_equal``22 :default: ``nulls_equal``
31 :allowed: ``nulls_equal``, ``nulls_unequal``, ``nulls_ignored``23 :allowed: ``nulls_equal``, ``nulls_unequal``, ``nulls_ignored``
3224
33The values and meanings are almost same to ``myisam_stats_method`` option of native |MySQL| (``nulls_equal``, ``nulls_unequal``, ``nulls_ignored``). But |InnoDB| doesn't have several patterns of statistics currently. So, though this option able to be changed dynamically, we need re-calculate statistics to change the method for the table.25The values and meanings are almost same to ``myisam_stats_method`` option of native |MySQL| (``nulls_equal``, ``nulls_unequal``, ``nulls_ignored``). But |InnoDB| doesn't have several patterns of statistics currently. Even though this option can be changed dynamically, statistics needs to be re-calculated to change the method for the table.
3426
35(reference: `MyISAM Index Statistics Collection <http://dev.mysql.com/doc/refman/5.1/en/myisam-index-statistics.html>`_)27(reference: `MyISAM Index Statistics Collection <http://dev.mysql.com/doc/refman/5.1/en/myisam-index-statistics.html>`_)
3628
@@ -41,7 +33,7 @@
41 :type: BOOLEAN33 :type: BOOLEAN
42 :default: 134 :default: 1
4335
44|InnoDB| updates the each index statistics automatically (many updates were done, some information_schema is accessed, table monitor, etc.). Setting this option 0 can stop these automatic recalculation of the statistics except for “first open” and “ANALYZE TABLE command”.36|InnoDB| updates the each index statistics automatically (many updates were done, some information_schema is accessed, table monitor, etc.). Setting this option 0 can stop these automatic recalculation of the statistics except for "first open" and "ANALYZE TABLE command".
4537
4638
47.. variable:: innodb_stats_update_need_lock39.. variable:: innodb_stats_update_need_lock
@@ -65,7 +57,41 @@
65INFORMATION_SCHEMA Tables57INFORMATION_SCHEMA Tables
66=========================58=========================
6759
68Two new tables were introduced by this feature.60.. table:: INFORMATION_SCHEMA.INNODB_SYS_STATS
61
62 :column INDEX_ID: Index ID
63 :column KEY_COLS: Number of Key Columns
64 :column DIFF_VALS: Number of Different Values.
65 :column NON_NULL_VALS: Number of Non NULL Values.
66
67
68.. table:: INFORMATION_SCHEMA.INNODB_SYS_TABLES
69
70 Shows the information about InnoDB tables
71
72 :column SCHEMA: Schema (database) name
73 :column NAME: Table name
74 :column ID: Table ID
75 :column N_COLS: Number of Columns
76 :column TYPE:
77 :column MIX_ID: This value is obsolete, value is always 0
78 :column MIX_LEN: Contains 0 for regular tables and 1 for temporary tables
79 :column CLUSTER_NAME: This value isn't supported anymore, value is always NULL
80 :column SPACE: Tablespace ID
81
82
83.. table:: INFORMATION_SCHEMA.INNODB_SYS_INDEXES
84
85 Shows the information about InnoDB indexes
86
87 :column TABLE_ID: Table ID
88 :column ID: Index ID
89 :column NAME: Index Name
90 :column N_FIELDS: Number of fields
91 :column TYPE:
92 :column SPACE: Tablespace ID
93 :column PAGE_NO: The page offset within its tablespace
94
6995
70.. table:: INFORMATION_SCHEMA.INNODB_TABLE_STATS96.. table:: INFORMATION_SCHEMA.INNODB_TABLE_STATS
7197
@@ -78,7 +104,7 @@
78 :column other_size: Other index (non primary key) size in number of pages.104 :column other_size: Other index (non primary key) size in number of pages.
79 :column modified: Internal counter to judge whether statistics recalculation should be done.105 :column modified: Internal counter to judge whether statistics recalculation should be done.
80106
81If the value of modified column exceeds “rows / 16” or 2000000000, the statistics recalculation is done when ``innodb_stats_auto_update == 1``. We can estimate the oldness of the statistics by this value.107If the value of modified column exceeds "rows / 16" or 2000000000, the statistics recalculation is done when ``innodb_stats_auto_update == 1``. We can estimate the oldness of the statistics by this value.
82108
83.. table:: INFORMATION_SCHEMA.INNODB_INDEX_STATS109.. table:: INFORMATION_SCHEMA.INNODB_INDEX_STATS
84110
@@ -88,24 +114,15 @@
88 :column table_name: Table name.114 :column table_name: Table name.
89 :column index_name: Index name.115 :column index_name: Index name.
90 :column fields: How many fields the index key has. (it is internal structure of |InnoDB|, it may be larger than the ``CREATE TABLE``).116 :column fields: How many fields the index key has. (it is internal structure of |InnoDB|, it may be larger than the ``CREATE TABLE``).
91 :column rows_per_key: Estimate rows per 1 key value. ([1 column value], [2 columns value], [3 columns value], ...).117 :column rows_per_keys: Estimate rows per 1 key value. ([1 column value], [2 columns value], [3 columns value], ...).
92 :column index_total_pages: Number of index pages.118 :column index_size: Number of index pages.
93 :column index_leaf_pages: Number of leaf pages.119 :column index_pages: Number of leaf pages.
94120
95In releases before 5.5.8-20.0, these fields had different names:
96
97 * ``rows_per_key`` was ``row_per_keys``
98
99 * ``index_total_pages`` was ``index_size``
100
101 * ``index_leaf_pages`` was ``leaf_pages``
102121
103Example122Example
104=======123=======
105124
106This example uses the same data to Bug #30423 of |MySQL|.125``[innodb_stats_method = nulls_equal (default behavior of InnoDB)]`` ::
107
108``[innodb_stats_method = nulls_equal (default behavior of |InnoDB|)]`` ::
109126
110 mysql> explain SELECT COUNT(*), 0 FROM orgs2 orgs LEFT JOIN sa_opportunities2 sa_opportunities ON orgs.org_id=sa_opportunities.org_id LEFT JOIN contacts2 contacts ON orgs.org_id=contacts.org_id;127 mysql> explain SELECT COUNT(*), 0 FROM orgs2 orgs LEFT JOIN sa_opportunities2 sa_opportunities ON orgs.org_id=sa_opportunities.org_id LEFT JOIN contacts2 contacts ON orgs.org_id=contacts.org_id;
111 +----+-------------+------------------+-------+-----------------+-----------------+---------+-------------------+-------+-------------+128 +----+-------------+------------------+-------+-----------------+-----------------+---------+-------------------+-------+-------------+
@@ -145,15 +162,15 @@
145 | table_name | index_name | fields | row_per_keys | index_size | leaf_pages |162 | table_name | index_name | fields | row_per_keys | index_size | leaf_pages |
146 +------------------------+-----------------+--------+--------------+------------+------------+163 +------------------------+-----------------+--------+--------------+------------+------------+
147 | test/sa_opportunities2 | GEN_CLUST_INDEX | 1 | 1 | 21 | 20 |164 | test/sa_opportunities2 | GEN_CLUST_INDEX | 1 | 1 | 21 | 20 |
148 | test/sa_opportunities2 | sa_opp$org_id | 2 | 338, 1 | 11| 10 |165 | test/sa_opportunities2 | sa_opp$org_id | 2 | 338, 1 | 11| 10 |
149 | test/orgs2 | orgs$org_id | 1 | 1 | 1 | 1 |166 | test/orgs2 | orgs$org_id | 1 | 1 | 1 | 1 |
150 | test/contacts2 | GEN_CLUST_INDEX | 1 | 1 | 97 | 80 |167 | test/contacts2 | GEN_CLUST_INDEX | 1 | 1 | 97 | 80 |
151 | test/contacts2 | contacts$org_id | 2 | 516, 0 | 97 | 37 |168 | test/contacts2 | contacts$org_id | 2 | 516, 0 | 97 | 37 |
152 +------------------------+-----------------+--------+--------------+------------+------------+169 +------------------------+-----------------+--------+--------------+------------+------------+
153 5 rows in set (0.00 sec)170 5 rows in set (0.00 sec)
154171
155Other reading172Other reading
156=============173=============
157174
158 * `InnoDB Table/Index stats <http://www.mysqlperformanceblog.com/2010/03/20/|InnoDB|-tableindex-stats/>`_175 * `InnoDB Table/Index stats <http://www.mysqlperformanceblog.com/2010/03/20/InnoDB-tableindex-stats/>`_
159176
160177
=== modified file 'doc/source/diagnostics/misc_info_schema_tables.rst'
--- doc/source/diagnostics/misc_info_schema_tables.rst 2012-10-11 09:18:35 +0000
+++ doc/source/diagnostics/misc_info_schema_tables.rst 2012-12-10 14:05:32 +0000
@@ -2,50 +2,6 @@
2Misc. INFORMATION_SCHEMA Tables2Misc. INFORMATION_SCHEMA Tables
3===============================3===============================
44
5This page lists the ``INFORMATION_SCHEMA`` tables added to standard |MySQL| by |Percona Server| that don``t exist elsewhere in the documentation.
6
7|InnoDB| transactions
8=====================
9
10.. table:: INFORMATION_SCHEMA.INNODB_LOCK_WAITS
11
12 :column REQUESTING_TRX_ID:
13 :column REQUESTED_LOCK_ID:
14 :column BLOCKING_TRX_ID:
15 :column BLOCKING_LOCK_ID:
16
17.. table:: INFORMATION_SCHEMA.INNODB_LOCKS
18
19 :column LOCK_ID: Internal unique lock ID
20 :column LOCK_TRX_ID: ID of the transaction holding the lock
21 :column LOCK_MODE: Mode of the lock (shared, exclusive, …)
22 :column LOCK_TYPE: ``RECORD`` for a record lock and ``TABLE`` for a table lock
23 :column LOCK_TABLE: Name of the table holding the lock
24 :column LOCK_INDEX: If lock type is ``RECORD``, name of the index
25 :column LOCK_SPACE: If lock type is ``RECORD``, tablespace id of the locked record
26 :column LOCK_PAGE: If lock type is ``RECORD``, page number of the locked record
27 :column LOCK_REC: If lock type is ``RECORD``, heap number of the locked record
28 :column LOCK_DATA: If lock type is ``RECORD``, primary key of the locked record
29
30This table contains information on each lock that is requested by any transaction and on each lock that is held by any transaction. You can get details about the transactions involved by joining INNODB_LOCKS with INNODB_TRX on TRX_ID.
31
32This table was introduced by the |InnoDB| plugin and you can find the full documentation here.
33
34.. table:: INFORMATION_SCHEMA.INNODB_TRX
35
36 :column TRX_ID: |InnoDB| internal unique transaction id
37 :column TRX_STATE: Execution state. Possible values are: ``Running``, ``Lock_wait``, ``Rolling_back``, ``Committing``
38 :column TRX_STARTED: Transaction start time
39 :column TRX_REQUESTED_LOCK_ID: Id of the lock the transaction has requested
40 :column TRX_WAIT_STARTED: Date and time when the transaction started waiting for a lock
41 :column TRX_WEIGHT: Weight of the transaction, ie approximate number of locked and modified rows
42 :column TRX_MYSQL_THREAD_ID: Thread id
43 :column TRX_QUERY: SQL query being executed
44
45This table holds information on every transaction running in the |InnoDB| kernel. Contrary to the output of SHOW |InnoDB| STATUS, it doesn``t show information on idle transactions.
46
47This table was introduced by the |InnoDB| plugin and you can find the full documentation here.
48
49Temporary tables5Temporary tables
50================6================
517
@@ -82,3 +38,126 @@
82 :column UPDATE_TIME: Date and time of the latest update of the temporary table38 :column UPDATE_TIME: Date and time of the latest update of the temporary table
8339
84This table holds information on the temporary tables existing for the running connection.40This table holds information on the temporary tables existing for the running connection.
41
42Buffer Pool Data Structure Tables
43=================================
44
45The following tables provide various information about the contents of the |InnoDB| buffer pool.
46
47.. table:: INFORMATION_SCHEMA.INNODB_BUFFER_POOL_PAGES
48
49 :column PAGE_TYPE: Type of the page. Possible values: index, undo_log, inode, ibuf_free_list, allocated, bitmap, sys, trx_sys, fsp_hdr, xdes, blob, zblob, zblob2, unknown
50 :column SPACE_ID: tablespace ID
51 :column PAGE_NO: page offset within its tablespace
52 :column LRU_POSITION: page position in the LRU list
53 :column FIX_COUNT: reference count of a page. It is incremented every time the page is accessed by InnoDB, it is 0 if and only if the page is not currently being accessed.
54 :column FLUSH_TYPE: type of the last flush of the page (0:LRU 2:flush_list)
55
56Example: ::
57
58 mysql> select * from information_schema.INNODB_BUFFER_POOL_PAGES LIMIT 20;
59 +-----------+----------+---------+--------------+-----------+------------+
60 | page_type | space_id | page_no | lru_position | fix_count | flush_type |
61 +-----------+----------+---------+--------------+-----------+------------+
62 | allocated | 0 | 7 | 3 | 0 | 2 |
63 | allocated | 0 | 1 | 4 | 0 | 0 |
64 | allocated | 0 | 3 | 5 | 0 | 0 |
65 | inode | 0 | 2 | 6 | 0 | 2 |
66 | index | 0 | 4 | 7 | 0 | 2 |
67 | index | 0 | 11 | 8 | 0 | 0 |
68 | index | 0 | 12956 | 9 | 0 | 0 |
69 | allocated | 0 | 5 | 10 | 0 | 2 |
70 | allocated | 0 | 6 | 11 | 0 | 2 |
71 | undo_log | 0 | 51 | 12 | 0 | 2 |
72 | undo_log | 0 | 52 | 13 | 0 | 2 |
73 | index | 0 | 8 | 14 | 0 | 0 |
74 | index | 0 | 288 | 15 | 0 | 0 |
75 | index | 0 | 290 | 16 | 0 | 2 |
76 | index | 0 | 304 | 17 | 0 | 0 |
77 | allocated | 0 | 0 | 18 | 0 | 2 |
78 | index | 0 | 10 | 19 | 0 | 0 |
79 | index | 0 | 12973 | 20 | 0 | 0 |
80 | index | 0 | 9 | 21 | 0 | 2 |
81 | index | 0 | 12 | 22 | 0 | 0 |
82 +-----------+----------+---------+--------------+-----------+------------+
83 20 rows in set (0.81 sec)
84
85This table shows the characteristics of the allocated pages in buffer pool and current state of them.
86
87.. table:: INFORMATION_SCHEMA.INNODB_BUFFER_POOL_PAGES_INDEX
88
89 :column index_id: index name
90 :column space_id: tablespace ID
91 :column page_no: page offset within its tablespace
92 :column n_recs: number of user records on page
93 :column data_size: sum of the sizes of the records in page
94 :column hashed: the block is in adaptive hash index (1) or not (0)
95 :column access_time: time of the last access to this page.
96 :column modified: modified since loaded (1) or not (0)
97 :column dirty: modified since last flushed (1) or not (0)
98 :column old: is old blocks in the LRU list (1) or not (0)
99 :column lru_position: page position in the LRU list
100 :column fix_count: reference count of a page. It is incremented every time the page is accessed by InnoDB, it is 0 if and only if the page is not currently being accessed.
101 :column flush_type: type of the last flush of the page (0:LRU 2:flush_list)
102
103Example: ::
104
105 +----------+----------+---------+--------+-----------+--------+-------------+----------+-------+-----+--------------+-----------+------------+
106 | index_id | space_id | page_no | n_recs | data_size | hashed | access_time | modified | dirty | old | lru_position | fix_count | flush_type |
107 +----------+----------+---------+--------+-----------+--------+-------------+----------+-------+-----+--------------+-----------+------------+
108 | 39 | 0 | 5787 | 468 | 14976 | 1 | 2636182517 | 1 | 0 | 1 | 0 | 0 | 2 |
109 | 40 | 0 | 5647 | 1300 | 15600 | 1 | 2636182517 | 1 | 0 | 1 | 0 | 0 | 2 |
110 | 39 | 0 | 5786 | 468 | 14976 | 1 | 2636182516 | 1 | 0 | 1 | 0 | 0 | 2 |
111 | 40 | 0 | 6938 | 1300 | 15600 | 1 | 2636193968 | 1 | 0 | 1 | 0 | 0 | 2 |
112 | 39 | 0 | 5785 | 468 | 14976 | 1 | 2636182514 | 1 | 0 | 1 | 0 | 0 | 2 |
113 | 39 | 0 | 5784 | 468 | 14976 | 1 | 2636182512 | 1 | 0 | 1 | 0 | 0 | 2 |
114 | 40 | 0 | 5646 | 1300 | 15600 | 1 | 2636182511 | 1 | 0 | 1 | 0 | 0 | 2 |
115 | 39 | 0 | 7203 | 468 | 14976 | 1 | 2636193967 | 1 | 0 | 1 | 0 | 0 | 2 |
116 | 39 | 0 | 5783 | 468 | 14976 | 1 | 2636182507 | 1 | 0 | 1 | 0 | 0 | 2 |
117 | 39 | 0 | 5782 | 468 | 14976 | 1 | 2636182506 | 1 | 0 | 1 | 0 | 0 | 2 |
118 +----------+----------+---------+--------+-----------+--------+-------------+----------+-------+-----+--------------+-----------+------------+
119
120This table shows information about the index pages located in the buffer pool.
121
122.. table:: INFORMATION_SCHEMA.INNODB_BUFFER_POOL_PAGES_BLOB
123
124 :column space_id: tablespace id
125 :column page_no: page offset within its tablespace
126 :column compressed: contains compressed data (1) or not (0)
127 :column part_len: data length in the page
128 :column next_page_no: page number of the next data
129 :column lru_position: page position in the LRU list
130 :column fix_count: reference count of a page. It is incremented every time the page is accessed by InnoDB, it is 0 if and only if the page is not currently being accessed.
131 :column flush_type: type of the last flush of the page (0:LRU 2:flush_list)
132
133Example: ::
134
135 mysql> select * from information_schema.INNODB_BUFFER_POOL_PAGES_BLOB LIMIT 20;
136 +----------+---------+------------+----------+--------------+--------------+-----------+------------+
137 | space_id | page_no | compressed | part_len | next_page_no | lru_position | fix_count | flush_type |
138 +----------+---------+------------+----------+--------------+--------------+-----------+------------+
139 | 1748 | 111 | 0 | 10137 | 0 | 263 | 0 | 2 |
140 | 1748 | 307 | 0 | 5210 | 0 | 1084 | 0 | 2 |
141 | 1748 | 1329 | 0 | 6146 | 0 | 4244 | 0 | 2 |
142 | 1748 | 1330 | 0 | 11475 | 0 | 4245 | 0 | 2 |
143 | 1748 | 1345 | 0 | 5550 | 0 | 4247 | 0 | 2 |
144 | 1748 | 1346 | 0 | 7597 | 0 | 4248 | 0 | 2 |
145 | 1748 | 3105 | 0 | 6716 | 0 | 8919 | 0 | 2 |
146 | 1748 | 3213 | 0 | 8170 | 0 | 9390 | 0 | 2 |
147 | 1748 | 6142 | 0 | 5648 | 0 | 19638 | 0 | 2 |
148 | 1748 | 7387 | 0 | 10634 | 0 | 24191 | 0 | 2 |
149 | 1748 | 7426 | 0 | 5355 | 0 | 24194 | 0 | 2 |
150 | 1748 | 7489 | 0 | 16330 | 7489 | 24196 | 0 | 2 |
151 | 1748 | 7490 | 0 | 7126 | 0 | 24197 | 0 | 2 |
152 | 1748 | 7657 | 0 | 13571 | 0 | 24681 | 0 | 2 |
153 | 1748 | 7840 | 0 | 11208 | 0 | 25737 | 0 | 2 |
154 | 1748 | 9599 | 0 | 11882 | 0 | 31989 | 0 | 2 |
155 | 1748 | 11719 | 0 | 7367 | 0 | 40466 | 0 | 2 |
156 | 1748 | 12051 | 0 | 11049 | 0 | 41441 | 0 | 2 |
157 | 1748 | 12052 | 0 | 16330 | 12052 | 41442 | 0 | 2 |
158 | 1748 | 12053 | 0 | 2674 | 0 | 41443 | 0 | 2 |
159 +----------+---------+------------+----------+--------------+--------------+-----------+------------+
160 20 rows in set (0.05 sec)
161
162This table shows information from blob pages located in buffer pool.
163
85164
=== modified file 'doc/source/diagnostics/response_time_distribution.rst'
--- doc/source/diagnostics/response_time_distribution.rst 2011-10-07 00:55:06 +0000
+++ doc/source/diagnostics/response_time_distribution.rst 2012-12-10 14:05:32 +0000
@@ -6,7 +6,7 @@
66
7The slow query log provides exact information about queries that take a long time to execute. However, sometimes there are a large number of queries that each take a very short amount of time to execute. This feature provides a tool for analyzing that information by counting and displaying the number of queries according to the the length of time they took to execute. The user can define time intervals that divide the range 0 to positive infinity into smaller intervals and then collect the number of commands whose execution times fall into each of those intervals.7The slow query log provides exact information about queries that take a long time to execute. However, sometimes there are a large number of queries that each take a very short amount of time to execute. This feature provides a tool for analyzing that information by counting and displaying the number of queries according to the the length of time they took to execute. The user can define time intervals that divide the range 0 to positive infinity into smaller intervals and then collect the number of commands whose execution times fall into each of those intervals.
88
9Note that in a replication environment, the server will not take into account *any* queries executed by the slave's SQL thread (whether they are slow or not) for the time distribution unless the log_slow_slave_statements variable is set.9Note that in a replication environment, the server will not take into account *any* queries executed by the slave's SQL thread (whether they are slow or not) for the time distribution unless the :variable:`log_slow_slave_statements` variable is set.
1010
11The feature isn't implemented in all versions of the server. The variable :variable:`have_response_time_distribution` indicates whether or not it is implemented in the server you are running.11The feature isn't implemented in all versions of the server. The variable :variable:`have_response_time_distribution` indicates whether or not it is implemented in the server you are running.
1212
@@ -197,10 +197,7 @@
197 Full functionality available.197 Full functionality available.
198198
199 * 5.1.53-12.4:199 * 5.1.53-12.4:
200 Introduced have_response_time_distribution.200 Introduced :variable:`have_response_time_distribution`.
201
202 * 5.5.8-20.0:
203 Renamed variable :variable:`enable_query_response_time_stats` to :variable:`query_response_time_stats`.
204201
205System Variables202System Variables
206================203================
@@ -233,9 +230,9 @@
233230
234 FLUSH QUERY_RESPONSE_TIME;231 FLUSH QUERY_RESPONSE_TIME;
235232
236.. variable:: query_response_time_stats233.. variable:: enable_query_response_time_stats
237234
238 :version 5.5.8-20.0: Introduced.235 :version 5.1.49-12.0: Introduced.
239 :cli: Yes236 :cli: Yes
240 :conf: Yes237 :conf: Yes
241 :scope: Global238 :scope: Global
@@ -246,24 +243,11 @@
246243
247This variable enables and disables collection of query times if the feature is available in the server that's running. If the value of variable :variable:`have_response_time_distribution` is YES, then you can enable collection of query times by setting this variable to ON using ``SET GLOBAL``.244This variable enables and disables collection of query times if the feature is available in the server that's running. If the value of variable :variable:`have_response_time_distribution` is YES, then you can enable collection of query times by setting this variable to ON using ``SET GLOBAL``.
248245
249 Prior to release 5.5.8-20.0, this variable was named :variable:`enable_query_response_time_stats`.
250
251
252INFORMATION_SCHEMA Tables246INFORMATION_SCHEMA Tables
253=========================247=========================
254248
255.. table:: INFORMATION_SCHEMA.QUERY_RESPONSE_TIME249.. table:: INFORMATION_SCHEMA.QUERY_RESPONSE_TIME
256250
257 :column VARCHAR TIME: 251 :column VARCHAR TIME: Interval range in which the query occurred
258 :column INT(11) COUNT: 252 :column INT(11) COUNT: Number of queries with execution times that fell into that interval
259 :column VARCHAR TOTAL: 253 :column VARCHAR TOTAL: Total execution time of the queries
260
261Implementation Details
262======================
263
264Implementation details on this feature are provided here.
265
266Related Reading
267===============
268
269 * `Blueprint about Response Time Distribution <https://blueprints.launchpad.net/percona-server/+spec/response-time-distribution>`_
270254
=== modified file 'doc/source/diagnostics/user_stats.rst'
--- doc/source/diagnostics/user_stats.rst 2011-10-07 00:55:06 +0000
+++ doc/source/diagnostics/user_stats.rst 2012-12-10 14:05:32 +0000
@@ -9,12 +9,6 @@
9The functionality is disabled by default, and must be enabled by setting ``userstat`` to ``ON``. It works by keeping several hash tables in memory. To avoid contention over global mutexes, each connection has its own local statistics, which are occasionally merged into the global statistics, and the local statistics are then reset to 0.9The functionality is disabled by default, and must be enabled by setting ``userstat`` to ``ON``. It works by keeping several hash tables in memory. To avoid contention over global mutexes, each connection has its own local statistics, which are occasionally merged into the global statistics, and the local statistics are then reset to 0.
1010
1111
12Version Specific Information
13============================
14
15 * :rn:`5.5.10-20.1`:
16 Renamed variable :variable:`userstat_running` to :variable:`userstat`.
17
18Other Information12Other Information
19=================13=================
2014
@@ -26,7 +20,7 @@
2620
27.. variable:: userstat_running21.. variable:: userstat_running
2822
29 :version 5.5.10-20.1: Renamed to :variable:`userstat`23 :version 5.1.49-rel11.3: variable introduced
30 :cli: Yes24 :cli: Yes
31 :conf: Yes25 :conf: Yes
32 :scope: Global26 :scope: Global
@@ -103,7 +97,7 @@
10397
104This table shows statistics on index usage. An older version of the feature contained a single column that had the ``TABLE_SCHEMA``, ``TABLE_NAME`` and ``INDEX_NAME`` columns concatenated together. The |Percona| version of the feature separates these into three columns. Users can see entries only for tables to which they have ``SELECT`` access.98This table shows statistics on index usage. An older version of the feature contained a single column that had the ``TABLE_SCHEMA``, ``TABLE_NAME`` and ``INDEX_NAME`` columns concatenated together. The |Percona| version of the feature separates these into three columns. Users can see entries only for tables to which they have ``SELECT`` access.
10599
106This table makes it possible to do many things that were difficult or impossible previously. For example, you can use it to find unused indexes and generate DROP commands to remove them.100This table makes it possible to do many things that were difficult or impossible previously. For example, you can use it to find unused indexes and generate DROP commands to remove them. If the index has not been used it won't be in this table.
107101
108Example: ::102Example: ::
109103
@@ -140,27 +134,29 @@
140134
141.. table:: INFORMATION_SCHEMA.THREAD_STATISTICS135.. table:: INFORMATION_SCHEMA.THREAD_STATISTICS
142136
143 :column THREAD_ID: int(21)137 :column THREAD_ID: ID of the thread.
144 :column TOTAL_CONNECTIONS: int(21)138 :column TOTAL_CONNECTIONS: The number of connections created from this thread.
145 :column CONCURRENT_CONNECTIONS: int(21)139 :column CONCURRENT_CONNECTIONS: The number of concurrent connections from this thread.
146 :column CONNECTED_TIME: int(21)140 :column CONNECTED_TIME: The cumulative number of seconds elapsed while there were connections from this thread.
147 :column BUSY_TIME: int(21)141 :column BUSY_TIME: The cumulative number of seconds there was activity from this thread.
148 :column CPU_TIME: int(21)142 :column CPU_TIME: The cumulative CPU time elapsed while servicing this thread.
149 :column BYTES_RECEIVED: int(21)143 :column BYTES_RECEIVED: The number of bytes received from this thread.
150 :column BYTES_SENT: int(21)144 :column BYTES_SENT: The number of bytes sent to this thread.
151 :column BINLOG_BYTES_WRITTEN: int(21)145 :column BINLOG_BYTES_WRITTEN: The number of bytes written to the binary log from this thread.
152 :column ROWS_FETCHED: int(21)146 :column ROWS_FETCHED: The number of rows fetched by this thread.
153 :column ROWS_UPDATED: int(21)147 :column ROWS_UPDATED: The number of rows updated by this thread.
154 :column TABLE_ROWS_READ: int(21)148 :column TABLE_ROWS_READ: The number of rows read from tables by this tread.
155 :column SELECT_COMMANDS: int(21)149 :column SELECT_COMMANDS: The number of ``SELECT`` commands executed from this thread.
156 :column UPDATE_COMMANDS: int(21)150 :column UPDATE_COMMANDS: The number of ``UPDATE`` commands executed from this thread.
157 :column OTHER_COMMANDS: int(21)151 :column OTHER_COMMANDS: The number of other commands executed from this thread.
158 :column COMMIT_TRANSACTIONS: int(21)152 :column COMMIT_TRANSACTIONS: The number of ``COMMIT`` commands issued by this thread.
159 :column ROLLBACK_TRANSACTIONS: int(21)153 :column ROLLBACK_TRANSACTIONS: The number of ``ROLLBACK`` commands issued by this thread.
160 :column DENIED_CONNECTIONS: int(21)154 :column DENIED_CONNECTIONS: The number of connections denied to this thread.
161 :column LOST_CONNECTIONS: int(21)155 :column LOST_CONNECTIONS: The number of thread connections that were terminated uncleanly.
162 :column ACCESS_DENIED: int(21)156 :column ACCESS_DENIED: The number of times this thread issued commands that were denied.
163 :column EMPTY_QUERIES: int(21)157 :column EMPTY_QUERIES: The number of times this thread sent empty queries to the server.
158
159In order for this table to be populated with statistics, additional variable :variable:`thread_statistics` should be set to ``ON``.
164160
165.. table:: INFORMATION_SCHEMA.USER_STATISTICS161.. table:: INFORMATION_SCHEMA.USER_STATISTICS
166162
167163
=== modified file 'doc/source/index.rst'
--- doc/source/index.rst 2012-10-31 15:51:11 +0000
+++ doc/source/index.rst 2012-12-10 14:05:32 +0000
@@ -134,7 +134,6 @@
134 :maxdepth: 1134 :maxdepth: 1
135 :glob:135 :glob:
136136
137 diagnostics/index_info_schema_tables
138 diagnostics/innodb_stats137 diagnostics/innodb_stats
139 diagnostics/user_stats138 diagnostics/user_stats
140 diagnostics/slow_extended139 diagnostics/slow_extended
@@ -165,6 +164,7 @@
165 development164 development
166 trademark-policy165 trademark-policy
167 upstream-bug-fixes166 upstream-bug-fixes
167 index_info_schema_tables
168 faq168 faq
169 compatibility169 compatibility
170 release-notes/release-notes_index170 release-notes/release-notes_index
171171
=== renamed file 'doc/source/diagnostics/index_info_schema_tables.rst' => 'doc/source/index_info_schema_tables.rst'
--- doc/source/diagnostics/index_info_schema_tables.rst 2012-10-11 09:18:35 +0000
+++ doc/source/index_info_schema_tables.rst 2012-12-10 14:05:32 +0000
@@ -6,26 +6,40 @@
66
7This is a list of the ``INFORMATION_SCHEMA TABLES`` that exist in |Percona Server| with |XtraDB|. The entry for each table points to the page in the documentation where it's described.7This is a list of the ``INFORMATION_SCHEMA TABLES`` that exist in |Percona Server| with |XtraDB|. The entry for each table points to the page in the documentation where it's described.
88
9 * :table:`CLIENT_STATISTICS`
10
11 * :table:`INDEX_STATISTICS`
12
9 * :table:`GLOBAL_TEMPORARY_TABLES`13 * :table:`GLOBAL_TEMPORARY_TABLES`
1014
15 * :table:`QUERY_RESPONSE_TIME`
16
17 * :table:`TEMPORARY_TABLES`
18
19 * :table:`TABLE_STATISTICS`
20
21 * :table:`THREAD_STATISTICS`
22
23 * :table:`USER_STATISTICS`
24
25 * :table:`INNODB_BUFFER_POOL_PAGES`
26
27 * :table:`INNODB_BUFFER_POOL_PAGES_BLOB`
28
29 * :table:`INNODB_BUFFER_POOL_PAGES_INDEX`
30
31 * :table:`INNODB_RSEG`
32
33 * :table:`INNODB_CHANGED_PAGES`
34
11 * :table:`INNODB_INDEX_STATS`35 * :table:`INNODB_INDEX_STATS`
1236
13 * :table:`INNODB_LOCK_WAITS`
14
15 * :table:`INNODB_LOCKS`
16
17 * :table:`INNODB_RSEG`
18
19 * :table:`INNODB_TABLE_STATS`37 * :table:`INNODB_TABLE_STATS`
2038
21 * :table:`INNODB_TRX`39 * :table:`INNODB_SYS_TABLES`
2240
23 * :table:`INNODB_CHANGED_PAGES`41 * :table:`INNODB_SYS_STATS`
2442
25 * :table:`PROCESSLIST`43 * :table:`INNODB_SYS_INDEXES`
2644
27 * :table:`QUERY_RESPONSE_TIME`45 * :table:`XTRADB_ADMIN_COMMAND`
28
29 * :table:`TEMPORARY_TABLES`
30
31
3246
=== modified file 'doc/source/management/innodb_lru_dump_restore.rst'
--- doc/source/management/innodb_lru_dump_restore.rst 2012-06-13 10:52:23 +0000
+++ doc/source/management/innodb_lru_dump_restore.rst 2012-12-10 14:05:32 +0000
@@ -132,6 +132,15 @@
132132
133When this variable is set to ON XtraDB waits until the restore of the dump is completed before reporting successful startup to the server.133When this variable is set to ON XtraDB waits until the restore of the dump is completed before reporting successful startup to the server.
134134
135``INFORMATION_SCHEMA`` Tables
136=============================
137
138This feature provides the following table:
139
140.. table:: INFORMATION_SCHEMA.XTRADB_ADMIN_COMMAND
141
142 :column result_message: result message of the ``XTRADB_ADMIN_COMMAND``
143
135Other reading144Other reading
136=============145=============
137146
138147
=== modified file 'doc/source/performance/innodb_opt_lru_count.rst'
--- doc/source/performance/innodb_opt_lru_count.rst 2011-10-07 00:55:06 +0000
+++ doc/source/performance/innodb_opt_lru_count.rst 2012-12-10 14:05:32 +0000
@@ -5,3 +5,4 @@
5=====================================5=====================================
66
7We removed ``buffer_pool`` mutex operations on counting blocks on LRU list where it is safe to delete. As drawback we may have some inaccurate information of LRU list, but it does not affect storage engine operations. As result we have decreased contention on ``buffer_pool`` mutex.7We removed ``buffer_pool`` mutex operations on counting blocks on LRU list where it is safe to delete. As drawback we may have some inaccurate information of LRU list, but it does not affect storage engine operations. As result we have decreased contention on ``buffer_pool`` mutex.
8

Subscribers

People subscribed via source and target branches