Change or Set MySQL Long Query Time Value for log-slow-queries שינוי או הגדרת שאילתת MySQL לונג שעה ערך עבור ההתחברות איטית שאילתות
If you אם enable slow queries log of MySQL database server לאפשר שאילתות איטי יומן של שרת מסד הנתונים MySQL , 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. , תבחין בכך מן הקובץ איטי יומן השאילתה מכילה רק משפטי SQL ושאילתות זה לקח יותר query_time של 10 שניות לבצע או לרוץ. This is the default value or query time threshold for log_slow_queries function, which is 10 seconds. זהו ערך ברירת המחדל או סף זמן השאילתה לתפקוד log_slow_queries, אשר 10 שניות. 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 שניות היא דרך ארוכה מדי עבור שאילתת SQL כדי להשלים, ולכן הערך עלול להיות גבוה מדי כדי ללכוד כל נתונים משמעותיים. You can alter or change the slow query time to lower value or number of seconds. אתה יכול לשנות או לשנות את השאילתה זמן איטי לערך נמוך או מספר שניות.
You can set a new long_query_time in the MySQL configuration file, namely my.cnf or my.ini, normally located in /etc directory. באפשרותך להגדיר long_query_time חדש בקובץ התצורה MySQL, כלומר my.cnf או my.ini, בדרך כלל נמצא / ספרייה וכו '. Simply add the following line to the configuration file: פשוט להוסיף את השורה הבאה לתצורת הקובץ:
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. מעל יגדיר את האפשרות להאט או להגביל שאילתה עוד 5 שניות, מה שאומר MySQL יתעד ולהיכנס כל שאילתות SQL זה לקח יותר זמן מאשר 5 שניות לבצע ולסיים בריצה קובץ יומן.
IMPORTANT : The page is machine translated and provided "as is" without warranty. חשוב: הדף מכונת תירגם מתפרסם "כמות שהוא" ללא אחריות. Machine translation may be difficult to understand. תרגום מכונה יכול להיות קשה להבין. Please refer to נא עיין original English article המאמר המקורי באנגלית whenever possible. בכל הזדמנות אפשרית.
Related Articles מאמרים קשורים
- Enable Logging of Slow Queries (Slow Query Log) in MySQL Database הפעל רישום של שאילתות איטי (Slow Query Log) ב-MySQL Database
- WordPress MySQL SQL Query Error in WPDB Class WordPress MySQL שאילתת SQL שגיאה WPDB Class
- Change and Reset MySQL root Password שינוי סיסמה איפוס שורש MySQL
- You Are Not Authorized to Execute SQL Queries in vBulletin Maintenance אינך מורשה לבצע שאילתות SQL ב ותחזוקה: vBulletin
- Fix for Munin MySQL Monitoring Plugin Graph Not Showing or Blank תקן עבור Munin MySQL ניטור תוסף גרף לא מראה או ריק
- Using PHP-MySQL Persistent Connections to Run WordPress Blog שימוש ב-MySQL PHP Persistent Connections כדי הפעלה בלוג WordPress
- Reset the Root Password of MySQL Server איפוס סיסמה השורש של MySQL Server
- Enable MySQL InnoDB Storage Engine Support in XAMPP Installation אפשר MySQL InnoDB מנוע אחסון תמיכה ב XAMPP התקנה
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 3 התקנת שרת אינטרנט ב FreeBSD 6.0 עם Apache 2.2, MySQL 5.0 ו-PHP 5 - חלק 3
- AskEraser to Delete Private Search Queries in Ask.com AskEraser כדי מחיקת פרטי שאילתות החיפוש ב-Ask.com










































June 20th, 2007 00:43 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. הקובע כי "10 שניות היא דרך ארוכה מדי עבור שאילתת SQL כדי להשלים" הוא מעט חסר אחריות, כמו 10 שניות יכול להיות סביר בהחלט עבור איזה שאילתות להשלים בהתחשב במערך וחומרה להיות שאילתה נגד בשילוב עם המורכבות של השאילתה.
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. מאחר כיצד דף זה בדירוג גבוה למדי עבור אנשים שיש בעיות ביצועים עם MySQL, אני מרגיש חשוב להגדיר את זה ישר. One should not read this article and assume that their queries are performing unreasonably slow simply because they take over 10 seconds. לא צריך לקרוא מאמר זה ואת להניח שאילתות שלהם מתפקדות באופן בלתי סביר איטי פשוט משום שהם להשתלט על 10 שניות.