QuicksearchDisclaimerThe individual owning this blog works for Oracle in Germany. The opinions expressed here are his own, are not necessarily reviewed in advance by anyone but the individual author, and neither Oracle nor any other party necessarily agrees with them.
|
< links for 2010-01-06 | The Deliverer's knowledge: Sun Cluster Step by Step - How to add an additional node to an existing single-node cluster? >
Detecting Mysql full-table scans with dtraceThursday, January 7. 2010Trackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
log_slow_queries = on
long_query_time = 0.1 log_queries_not_using_indexes = on und ggf. min_examined_row_limit = irgendwas Das erste schaltet das Slow Log an (in 5.1 endlich auch ohne einen Neustart des Servers). long_query_time kann nun endlich auch auf Werte unter 1s gesetzt werden. log_queries_not_using_indexes loggt Full Table Scans, und min_examined_row_limit sorgt dafür, daß solche Scans auf kleinen Tabellen nicht das Log cluttern.
Das min_examined_row_limit kannte ich noch nicht .... was gelernt
log_slow_queries can't log queries which take less than 1s - at least not in mysql 5.0 and older (I'm not sure about newer ones). Then this is only example and one can extend the script to do much more.
For example see MySQL TOP - http://milek.blogspot.com/2010/01/mysql-top.html |
+1The LKSF bookThe book with the consolidated Less known Solaris Tutorials is available for download here
Web 2.0Contact
Networking xing.com My photos Buttons![]() This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Germany License
![]() ![]() ![]() Blog AdministrationDonateOkay, okay ... as several people have asked for it ... but you know my opinion.
|