Home  Home  Home  Kontakt  Kontakt  Kontakt  Inhalt  Inhalt  Inhalt  Blog  Blog  Blog  FAQ  FAQ  FAQ

Profiles

-- Um Vergleiche bzgl. Performance zu erstellen müsste die DB "kalt"
-- Da geht aber meist nicht (Restart von MySQL)
-- => wenigstens die CACHEs so gut wie möglich leeren
RESET QUERY CACHE
FLUSH TABLES;
SET profiling_history_size=0;   -- disable
SET profiling_history_size=15;  -- default
-- ab jetzt von max profiling_history_size Statements (FIFO)
-- die Profiling Daten speichern
SET profiling = on;
-- SELECT ...
-- SELECT ...
-- ...
-- SELECT ...
-- zeige die Profiling-Daten vom letzten Statement
SHOW PROFILE;
SHOW PROFILES;
SHOW PROFILE FOR QUERY 1;
SHOW PROFILE FOR QUERY 3;