Portal Home > Knowledgebase > Articles Database > Control Database query


Control Database query




Posted by RomanEpo, 09-15-2014, 07:42 AM
I want to control mysql database query. Queries per second avg: 2896.162 , its increase mysql and server load. Server process manager show [php] , /usr/bin/php /home/------/public_html/index.php and /usr/local/apache/bin/httpd -k start -DSSL lots of process. Use CentOS and cPanel. I want to control server query. Last edited by RomanEpo; 09-15-2014 at 07:45 AM.

Posted by gotlivechat, 09-15-2014, 01:31 PM
Control it in what way? Reduce? Spread out?

Posted by RomanEpo, 09-16-2014, 12:55 AM
Reduce query and fix unnecessary process issue.

Posted by AlphaHostLV, 09-16-2014, 02:45 AM
Enable slow query log in /etc/mysql/my.cnf Put a low value there, for example 1, this will log all queries that takes more than 1 second.

Posted by Kailash12, 09-16-2014, 03:00 AM
Is this a problem with one certain account or you have still not found the problematic user? If you have not found it, see the running mysql processes. Also, you will have to make sure that your database is optimized and there is no corrupted tables. Use table index for fast output on large database.

Posted by RomanEpo, 09-21-2014, 09:15 AM
Hi, I installed and configure my.cnf as hardware resource. My main issue mysql query.Please see--- mysqladmin proc stat result Uptime: 83433 Threads: 11 Questions: 467997235 Slow queries: 36744 Opens: 26386 Flush tables: 1 Open tables: 24220 Queries per second avg: 5609.258 Most of query auto coming from wordpress script. Please suggest me how to control mysql server query. Thank you

Posted by Kailash12, 09-22-2014, 12:37 AM
Use mysqltuner script to see the recommendation to optimize MySQL variable. Also you have large number of slow queries. You should enable slow query log to find the problematic tables and queries.



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
Recommend a reseller (Views: 744)
IDE VS SATA server (Views: 744)
mail problem on plesk (Views: 770)
IP Blacklist (Views: 815)


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.