Change or Set MySQL Long Query Time Value for log-slow-queries Keisti arba Nustatyti MySQL Ilgalaikė Query Time Vertė log-lėtai užklausos
If you Jei enable slow queries log of MySQL database server kad lėtai užklausų istorija MySQL duomenų bazių serveris , you will notice that from the slow query log file contains only SQL statements and queries that took more than query_time of 10 seconds to execute or run. Jūs pastebėsite, kad iš lėto užklausą žurnalo faile yra tik SQL pareiškimus ir prašymus, kad prireikė daugiau nei query_time 10 sekundžių atlikti arba paleisti. This is the default value or query time threshold for log_slow_queries function, which is 10 seconds. Tai numatytoji vertė arba užklausą laiko riba log_slow_queries funkciją, kuri yra 10 sekundžių. 10 seconds is way too long for a SQL query to complete, so the value may be too high to capture any meaningful data. 10 sekundžių yra per daug ilgas SQL užklausą, todėl vertė gali būti per didelis fiksuoti bet kokius reikšmingus duomenis. You can alter or change the slow query time to lower value or number of seconds. Galite pakeisti ar pakeisti lėtai užklausą laiko žemesniąją vertę arba skaičių sekundžių.
You can set a new long_query_time in the MySQL configuration file, namely my.cnf or my.ini, normally located in /etc directory. Jūs galite nustatyti naują long_query_time į MySQL konfigūracijos failą, būtent my.cnf arba my.ini, paprastai esančių / etc. Simply add the following line to the configuration file: Tiesiog pridėkite šią eilutę failo konfigūracija:
long_query_time = 5 long_query_time = 5
Above option will set the slow or long query limit as 5 seconds, which means MySQL will capture and log all SQL queries that took longer than 5 seconds to execute and finish running to the log file. Virš galimybė nustatyti lėtai arba ilgą užklausos riba kaip 5 sekundes, o tai reiškia, MySQL, bus surinkimo ir prisijungti visus SQL užklausų kad užtruko ilgiau nei 5 sekundes, kad vykdyti ir baigti rodyti į žurnalo failą.
IMPORTANT : The page is machine translated and provided "as is" without warranty. DĖMESIO: Šis puslapis yra mašina išvertė ir pateikiama "kaip yra" be garantijų. Machine translation may be difficult to understand. Mašininio vertimo, gali būti sunku suprasti. Please refer to Remkitės original English article originalas anglų straipsnis whenever possible. jei įmanoma.
Related Articles Susiję straipsniai
- Enable Logging of Slow Queries (Slow Query Log) in MySQL Database Įjungti registravimas Slow queries (Žemas Užklausa Prisijungti) MySQL duomenų bazė
- WordPress MySQL SQL Query Error in WPDB Class WordPress MySQL, SQL Query Klaida WPDB klasė
- Change and Reset MySQL root Password Kaitos ir naujo MySQL root Password
- You Are Not Authorized to Execute SQL Queries in vBulletin Maintenance Jums neleidžiama vykdyti SQL užklausų pagal vBulletin priežiūra
- Fix for Munin MySQL Monitoring Plugin Graph Not Showing or Blank Pataisytas Munin MySQL stebėjimo Įskiepis diagrama Ne rodymas arba Tuščiasis
- Using PHP-MySQL Persistent Connections to Run WordPress Blog Naudojant PHP-MySQL patvariųjų Jungtys Vykdyti WordPress blog
- Reset the Root Password of MySQL Server Zresetuj Root Slaptažodis MySQL serverio
- Enable MySQL InnoDB Storage Engine Support in XAMPP Installation Įjungti MySQL InnoDB Saugojimo Variklis Pagalba XAMPP Diegimas
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 3 Diegimas serveris FreeBSD 6,0 su Apache 2.2, MySQL 5.0, PHP 5 - 3 dalis
- AskEraser to Delete Private Search Queries in Ask.com AskEraser ištrinti Privatūs paieška Ask.com










































June 20th, 2007 00:43 20 birželio, 2007 00:43
Stating that “10 seconds is way too long for a SQL query to complete” is slightly irresponsible, as 10 seconds might be perfectly reasonable for some queries to complete given the dataset and hardware being queried against combined with the complexity of the query. Teigdamas, kad "10 sekundžių yra per daug ilgas SQL užklausos baigti" yra šiek tiek neatsakingai, kaip 10 sekundžių, gali būti visiškai protinga kai kurias užklausas užbaigti atsižvelgiant į duomenų ir įrangos yra abejonių dėl kartu su sudėtingumą užklausą.
Seeing as how this page is ranking quite high for people having performance issues with MySQL, I feel it is important to set this straight. Matydamas, kaip šis puslapis reitingą gana didelis žmonių problemas su MySQL, manau svarbu nustatyti tiesiai. One should not read this article and assume that their queries are performing unreasonably slow simply because they take over 10 seconds. Vienas neturėtų skaityti šį straipsnį, ir daroma prielaida, kad jų prašymai atlikti pernelyg lėtai nes tiesiog perimti 10 sekundžių.