Monthly Archives - September 2008

Unused indexes by single query

Usually unused indexes are devil, they waste diskspace, cache, they make INSERT / DELETE / UPDATE operations slower and what makes them worse – it is hard to find them.
But now ( with userstatsV2.patch) you can find all unused indexes (since last restart of mysqld) by single query

Shell

SELECT DISTINCT s.TABLE_SCHEMA, s.TABLE_NAME, s.INDEX_NAME
FROM information_schema.statistics […]

Read more

Google’s user_statistics V2 port and changes

Recently Google published V2 release of patches, one of them user_statistics we use in our releases.
New features are quite interesting so we decided to port it to fresh releases of MySQL. Features includes:

New statistics per user (Cpu_time, Bytes_received, Bytes_sent, etc)
New command SHOW CLIENT_STATISTICS, which shows statistics per client’s hostname, not per user
FLUSH USER_ […]

Read more