5. COM_STATISTICS
Asks the MySQL server to compile a text
message with some server statistics (uptime,
queries per second, etc.).This packet can be sent
with mysqladmin status. No arguments.
$ mysqladmin status
Uptime: 41729399 Threads: 892 Questions: ... Slow queries: ... ...
http://forge.mysql.com/wiki/MySQL_Internals_ClientServer_Protocol#COM_STATISTICS
9. Optimistic health check
# config/initializers/active_record_extensions.rb
class ActiveRecord::ConnectionAdapters::MysqlAdapter
def active?
true
end
end
additional info: http://www.mysqlperformanceblog.com/2010/05/05/checking-for-a-live-database-connection-considered-harmful/
15. Lhm - alter
require "lhm"
alter table
class AddRailsberryToUsers < ActiveRecord::Migration
def up
Lhm.change_table :users do |u|
u.add_column :railsberry, "BOOLEAN DEFAULT true" lhmn_users
u.add_index :railsberry
end
end
end
16. Lhm - entangle
create trigger
users lhmn_users
after insert
after update
after delete