PROJET AUTOBLOG


Shaarli - Les discussions de Shaarli

Archivé

Site original : Shaarli - Les discussions de Shaarli

⇐ retour index

mysqlsla :: Parse, filter and sort MySQL slow, general and binary logs

mercredi 30 juillet 2014 à 10:31
Slobberbone, le 30/07/2014 à 10:31
mysqlsla parses, filters, analyzes and sorts MySQL slow, general, binary and microslow patched logs in order to create a customizable report of the queries and their meta-property values.

Since these reports are customizable, they can be used for human consumption or be fed into other scripts to further analyze the queries. For example, to profile with mk-query-profiler (a script from Baron Schwartz's Maatkit) every unique SELECT statement using database foo from a slow log:

        mysqlsla -lt slow slow.log -R print-unique -mf "db=foo" -sf "+SELECT" | \
        mk-query-profiler -separate -database foo



In brief, mysqlsla is a liaison allowing other scripts easy access to queries from a MySQL log. For a quick introduction to what mysqlsla is capable of doing, take a glance at the guide.
(Permalink)