mysql statistics

Found an useful command: "SHOW STATUS" or, depending on the mysql version, "SHOW GLOBAL STATUS". Of some interest also "SHOW VARIABLES" (or, correspondingly, "SHOW GLOBAL VARIABLES").

I'm recording the current statistics for later reference, to verify that I optimized PHP layer.

Short summary:

* Uptime: 522 hours
* 168 Bytes_received per second
* 1698 Bytes_sent per second
* One select per second (1.03835 Com_select per second)
* New connection each 10 seconds (.09529 Connections per second)

Full:

+--------------------------+------------+
| Variable_name            | Value      |
+--------------------------+------------+
| Aborted_clients          | 4          |
| Aborted_connects         | 12         |
| Bytes_received           | 315475800  |
| Bytes_sent               | 3190558135 |
| Com_admin_commands       | 0          |
| Com_alter_table          | 0          |
| Com_analyze              | 0          |
| Com_backup_table         | 0          |
| Com_begin                | 9952       |
| Com_change_db            | 552895     |
| Com_change_master        | 0          |
| Com_check                | 0          |
| Com_commit               | 9952       |
| Com_create_db            | 0          |
| Com_create_function      | 0          |
| Com_create_index         | 0          |
| Com_create_table         | 0          |
| Com_delete               | 9446       |
| Com_drop_db              | 0          |
| Com_drop_function        | 0          |
| Com_drop_index           | 0          |
| Com_drop_table           | 0          |
| Com_flush                | 0          |
| Com_grant                | 0          |
| Com_insert               | 13603      |
| Com_insert_select        | 150        |
| Com_kill                 | 0          |
| Com_load                 | 0          |
| Com_load_master_table    | 0          |
| Com_lock_tables          | 33477      |
| Com_optimize             | 0          |
| Com_purge                | 0          |
| Com_rename_table         | 0          |
| Com_repair               | 0          |
| Com_replace              | 850        |
| Com_replace_select       | 0          |
| Com_reset                | 0          |
| Com_restore_table        | 0          |
| Com_revoke               | 0          |
| Com_rollback             | 0          |
| Com_select               | 1951298    |
| Com_set_option           | 0          |
| Com_show_binlogs         | 0          |
| Com_show_create          | 0          |
| Com_show_databases       | 1          |
| Com_show_fields          | 61         |
| Com_show_grants          | 0          |
| Com_show_keys            | 0          |
| Com_show_logs            | 0          |
| Com_show_master_status   | 0          |
| Com_show_open_tables     | 0          |
| Com_show_processlist     | 0          |
| Com_show_slave_status    | 0          |
| Com_show_status          | 1          |
| Com_show_innodb_status   | 0          |
| Com_show_tables          | 6          |
| Com_show_variables       | 0          |
| Com_slave_start          | 0          |
| Com_slave_stop           | 0          |
| Com_truncate             | 0          |
| Com_unlock_tables        | 33477      |
| Com_update               | 114556     |
| Connections              | 179088     |
| Created_tmp_disk_tables  | 2779       |
| Created_tmp_tables       | 23833      |
| Created_tmp_files        | 0          |
| Delayed_insert_threads   | 0          |
| Delayed_writes           | 0          |
| Delayed_errors           | 0          |
| Flush_commands           | 1          |
| Handler_delete           | 15112      |
| Handler_read_first       | 290840     |
| Handler_read_key         | 8782628    |
| Handler_read_next        | 38501391   |
| Handler_read_prev        | 0          |
| Handler_read_rnd         | 4414964    |
| Handler_read_rnd_next    | 50157922   |
| Handler_update           | 604479     |
| Handler_write            | 123936     |
| Key_blocks_used          | 19509      |
| Key_read_requests        | 22960996   |
| Key_reads                | 188982     |
| Key_write_requests       | 41584      |
| Key_writes               | 20603      |
| Max_used_connections     | 6          |
| Not_flushed_key_blocks   | 0          |
| Not_flushed_delayed_rows | 0          |
| Open_tables              | 32         |
| Open_files               | 63         |
| Open_streams             | 0          |
| Opened_tables            | 4606       |
| Questions                | 2908726    |
| Select_full_join         | 197        |
| Select_full_range_join   | 82         |
| Select_range             | 142378     |
| Select_range_check       | 0          |
| Select_scan              | 709184     |
| Slave_running            | OFF        |
| Slave_open_temp_tables   | 0          |
| Slow_launch_threads      | 0          |
| Slow_queries             | 3          |
| Sort_merge_passes        | 0          |
| Sort_range               | 141902     |
| Sort_rows                | 5414754    |
| Sort_scan                | 264469     |
| Table_locks_immediate    | 3198111    |
| Table_locks_waited       | 77         |
| Threads_cached           | 0          |
| Threads_created          | 179087     |
| Threads_connected        | 1          |
| Threads_running          | 1          |
| Uptime                   | 1879227    |
+--------------------------+------------+
Categories:

Updated: