patternsqlMinor
what does SHOW /*!50000 GLOBAL */ STATUS do ?
Viewed 0 times
showglobalwhatstatusdoes50000
Problem
What is the difference between
and
I saw that in few scripts and tuning presentations the first command is being used. Is there a difference, If there is, what does the 50000 signify ?
Also, this seems to be a good script : https://raw.github.com/rackerhacker/MySQLTuner-perl/master/mysqltuner.pl
Are there any similar scripts that list important stats and display recommendations
SHOW /*!50000 GLOBAL */ STATUSand
SHOW GLOBAL STATUSI saw that in few scripts and tuning presentations the first command is being used. Is there a difference, If there is, what does the 50000 signify ?
Also, this seems to be a good script : https://raw.github.com/rackerhacker/MySQLTuner-perl/master/mysqltuner.pl
Are there any similar scripts that list important stats and display recommendations
Solution
The "50000" refers to a MySQL version -- it means that only version 5.0.0 and above should pay attention to that command. 5.0.0+ will see
Example:
(I have MySQL 5.5.11 -- i.e. 5.05.11).
SHOW GLOBAL STATUS, while earlier versions will see just SHOW STATUS.Example:
mysql> /*!50511 select 1 */;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.00 sec)
mysql> /*!50512 select 1 */;
Query OK, 0 rows affected (0.00 sec)(I have MySQL 5.5.11 -- i.e. 5.05.11).
Code Snippets
mysql> /*!50511 select 1 */;
+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.00 sec)
mysql> /*!50512 select 1 */;
Query OK, 0 rows affected (0.00 sec)Context
StackExchange Database Administrators Q#15670, answer score: 5
Revisions (0)
No revisions yet.