Sasa Posted June 2, 2014 Report Share Posted June 2, 2014 (edited) my.conf failā ir šādi: # Here you can see queries with especially long duration log_slow_queries = /var/log/mysql/mysql-slow.log long_query_time = 2 log-queries-not-using-indexes Tālāk skatos mysql-slow.log failu: SELECT payed.*, firmas_links.* FROM payed JOIN firmas_links ON firmas_links.id=payed.elem_id WHERE payed.fdate<=NOW() AND payed.tdate>=NOW() AND (payed.etype="lr" or payed.etype="lb") ORDER BY payed.etype DESC,RAND(); # User@Host: companies[companies] @ localhost [] # Query_time: 0.000378 Lock_time: 0.000065 Rows_sent: 0 Rows_examined: 27 Nesaprotu Query_time ir 0.000378 vai tas ir ilgāk kā man konfigurācijā norādīts? Edited June 2, 2014 by Sasa Quote Link to comment Share on other sites More sharing options...
jurchiks Posted June 2, 2014 Report Share Posted June 2, 2014 (edited) Interesanti tev tie tabulu nosaukumi, ne ta angliski, ne latviski... Tas kverijs neizmanto indeksus, tāpēc tiek ielogots. To dara "log-queries-not-using-indexes". Tas konfigs ignorē "long_query_time". Tā kā laiks uzlikt indeksus uz "payed.etype" un "payed.fdate/tdate". Edited June 2, 2014 by jurchiks Quote Link to comment Share on other sites More sharing options...
Sasa Posted June 2, 2014 Author Report Share Posted June 2, 2014 ok, tagad skaidrs paldies. PS. jā tabulu nosaukumi interesanti nav manis veidoti pārņemta uzturēšana Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.