Change or Set MySQL Long Query Time Value for log-slow-queries Palitan o Itakda ang MySQL Query Long Time Value para sa mga mag-log-mabagal-tanong
If you Kung kayo enable slow queries log of MySQL database server mabagal na paganahin ang tanong sa mag-log ng MySQL database server , 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. , Mapapansin mo na mula sa mabagal na file na query ay naglalaman ng mga mag-log lamang SQL pahayag at mga tanong na nakakuha ng higit sa query_time ng 10 segundo upang maipatupad o tumakbo. This is the default value or query time threshold for log_slow_queries function, which is 10 seconds. Ito ang default na halaga o mga query oras threshold para sa log_slow_queries function, na kung saan ay 10 segundo. 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 mga segundo na paraan ay masyadong mahaba para sa isang SQL query upang makumpleto, kaya ang halaga ay maaaring masyadong mataas upang makuha ang anumang makabuluhan na data. You can alter or change the slow query time to lower value or number of seconds. Maaari mong baguhin o palitan ang mabagal na oras sa query sa mas mababang halaga o bilang ng mga segundo.
You can set a new long_query_time in the MySQL configuration file, namely my.cnf or my.ini, normally located in /etc directory. Maaari kang magtakda ng isang bagong long_query_time sa file MySQL configuration, namely my.cnf o my.ini, karaniwang matatagpuan sa / etc direktoryo. Simply add the following line to the configuration file: Mangyari lamang na idagdag ang sumusunod na linya sa 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. Opsyon sa itaas ay itakda ang mabagal o pang tanong sa limitasyon sa bilang 5 segundo, na nangangahulugan na MySQL ay kukunin at mag-log ang lahat ng SQL query na nakakuha ng mas mahaba kaysa sa 5 segundo upang maipatupad at tapusin ang tumatakbo sa log file.
IMPORTANT : The page is machine translated and provided "as is" without warranty. MAHALAGA: Ang pahina ng makina ay isinalin at ibinigay "bilang ganito" walang warranty. Machine translation may be difficult to understand. Machine pagsasalin ay maaaring mahirap maintindihan. Please refer to Mangyaring sumangguni sa original English article orihinal na Ingles na artikulo whenever possible. hangga't maaari.
Related Articles Mga Kaugnay na Akda
- Enable Logging of Slow Queries (Slow Query Log) in MySQL Database Paganahin Logging Mabagal ng mga Tanong (Mabagal Query Lumikha ng account) sa MySQL Database
- WordPress MySQL SQL Query Error in WPDB Class WordPress MySQL SQL Query Error sa WPDB Klase
- Change and Reset MySQL root Password Baguhin ang I-reset at MySQL root Password
- You Are Not Authorized to Execute SQL Queries in vBulletin Maintenance Hindi ka ba Awtorisadong-execute SQL Queries sa vBulletin Maintenance
- Fix for Munin MySQL Monitoring Plugin Graph Not Showing or Blank Ayusin para sa Munin MySQL Monitoring Plugin Graph Hindi Showing o Blangkong
- Using PHP-MySQL Persistent Connections to Run WordPress Blog Ang paggamit ng PHP MySQL-persistent mga koneksyon sa Run WordPress Blog
- Reset the Root Password of MySQL Server I-reset ang Root Password ng MySQL Server
- Enable MySQL InnoDB Storage Engine Support in XAMPP Installation Paganahin ang MySQL InnoDB Imbakan Engine Suporta sa Pag-install ng XAMPP
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 3 Pag-install ng Web Server sa FreeBSD 6.0 sa Apache 2.2, MySQL 5.0 at PHP 5 - Part 3
- Installing Web Server in FreeBSD 6.0 with Apache 2.2, MySQL 5.0 and PHP 5 – Part 5 Pag-install ng Web Server sa FreeBSD 6.0 sa Apache 2.2, MySQL 5.0 at PHP 5 - Part 5










































June 20th, 2007 00:43 Hunyo 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. Na naglalahad na ang "10 segundo ay ang paraan masyadong mahaba para sa isang SQL query upang makumpleto ang" ay bahagyang iresponsable, gaya ng 10 segundo ay maaaring maging ganap na makatwirang para sa ilang mga tanong upang makumpleto ang ibinigay sa dataset at hardware sa pagiging queried laban kasama ang kasalimuotan ng mga tanong.
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. Nakakakita ng kung paano ang pahina na ito ang ranggo ganap mataas na para sa mga taong may mga isyu na may pagganap MySQL, sa tingin ko ito ay mahalaga upang magtakda ng tuwid na ito. One should not read this article and assume that their queries are performing unreasonably slow simply because they take over 10 seconds. Hindi isa ay dapat na basahin ang artikulong ito at ipinapalagay na ang kanilang mga tanong ay gumaganap hindi makatwirang mabagal na lamang dahil sila ay kumuha ng higit sa 10 segundo.