Change or Set MySQL Long Query Time Value for log-slow-queries Maina vai Set MySQL Long Query Time Vērtība, kam log-lēni queries
If you Ja jūs enable slow queries log of MySQL database server ļauj lēni queries log no MySQL datu bāzes 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 ievērosiet, ka no lēni query log fails satur tikai SQL pārskati un jautājumiem, kas prasīja vairāk nekā query_time 10 sekundes, lai veiktu vai darboties. This is the default value or query time threshold for log_slow_queries function, which is 10 seconds. Šī ir noklusējuma vērtības vai vaicājumu laika slieksni log_slow_queries funkcija, kas ir 10 sekundes. 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 sekundes ir pārāk ilgi uz SQL query, lai pabeigtu, tā vērtība var būt pārāk augstas, lai iegūtu jebkādu nozīmīgu informāciju. You can alter or change the slow query time to lower value or number of seconds. Varat mainīt vai mainīt lēns query laiku zemāko vērtību vai skaitu sekundes.
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 varat uzstādīt jaunu long_query_time ar MySQL konfigurācijas failu, proti my.cnf vai my.ini, parasti atrodas / etc direktorijā. Simply add the following line to the configuration file: Vienkārši pievienot šādas līnijas līdz konfigurācijas failu:
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. Virs iespēja noteikt lēns vai ilgu query ierobežojuma kā 5 sekundes, un tas nozīmē, MySQL būs uztveršanas un log visi SQL vaicājumi, ņēma ilgāk kā 5 sekundes, lai izpildīt un pabeigt neaudzē log failu.
IMPORTANT : The page is machine translated and provided "as is" without warranty. SVARĪGI: Šī lapa ir mašīna tulkoto un ar nosacījumu ", kas ir" bez garantijas. Machine translation may be difficult to understand. Machine translation var būt grūti saprast. Please refer to Lūdzu, skatiet original English article oriģināls angļu rakstu whenever possible. kad vien iespējams.
Related Articles Saistītie raksti
- Enable Logging of Slow Queries (Slow Query Log) in MySQL Database Enable iegrāmatošana Lēna vaicājumu (Lēna Query Log) in MySQL Database
- WordPress MySQL SQL Query Error in WPDB Class WordPress MySQL SQL vaicājumu Kļūda WPDB klase
- Change and Reset MySQL root Password Pārmaiņām un Reset MySQL root parole
- You Are Not Authorized to Execute SQL Queries in vBulletin Maintenance Jums nav tiesību Execute SQL vaicājumu in vBulletin Maintenance
- Fix for Munin MySQL Monitoring Plugin Graph Not Showing or Blank Noteikt, Munin MySQL Monitoring Plugin Graph nerāda vai Blank
- Using PHP-MySQL Persistent Connections to Run WordPress Blog Izmantojot PHP, MySQL noturīgiem Savienojumi ar Run WordPress Blog
- Reset the Root Password of MySQL Server Reset to Root paroli MySQL Server
- Enable MySQL InnoDB Storage Engine Support in XAMPP Installation Enable MySQL InnoDB Storage Engine Atbalsts XAMPP Installation
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 3 Instalēšana Web serveri FreeBSD 6,0 ar Apache 2.2, MySQL 5.0 un PHP 5 - 3.daļa
- AskEraser to Delete Private Search Queries in Ask.com AskEraser izdzēst Private meklēšanas vaicājumiem, kas Ask.com










































June 20th, 2007 00:43 Jūnijs 20, 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. Apgalvo, ka "10 sekundes ir pārāk ilgi uz SQL query, lai pabeigtu" ir nedaudz bezatbildīgi, kā 10 sekundes, var būt pilnīgi saprātīgi, daži jautājumi, lai, ņemot vērā datu un aparatūras ir apšaubījušas pret kopā ar sarežģītību, vaicājumu.
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. Redzot, par to, kā šī lapa ir ranking pietiekami augsts, lai cilvēki, kam veiktspējas jautājumiem, ar MySQL, es uzskatu, ka ir svarīgi, lai noteiktu šo taisni. One should not read this article and assume that their queries are performing unreasonably slow simply because they take over 10 seconds. Viens nevajadzētu lasīt šo rakstu un pieņemt, ka viņu queries veic nepamatoti lēns tikai tāpēc, ka tās veic vairāk nekā 10 sekundes.