Invalid SQL: REPLACE INTO `swsessions` (`sessionid`, `ipaddress`, `lastactivity`, `useragent`, `isloggedin`, `sessiontype`, `typeid`, `dateline`, `status`) VALUES('cze40nlczvouxvbe0irlg31cvqpwsifk', '107.22.118.242', '1506310096', 'CCBot/2.0 (http://commoncrawl.org/faq/)', '0', '40', '0', '1506310096', '0'); (The table 'swsessions' is full) Slow Query Logging in MySQL - Powered By Kayako SupportSuite
Fluid Hosting 24 Sep 2017 
HomeServicesSupportContact UsAbout UsForums |
Support Center » Knowledgebase » Slow Query Logging in MySQL
 Slow Query Logging in MySQL
Solution One of the built-in tools in MySQL that you can use in optimizing your database is the "slow-query-logging" feature. This feature allows you to log slow running queries to a log file. By default, this feature is not enabled on your VPS and you will need to add a couple of lines in your "/etc/my.cnf" file (in the [mysqld] section) which I have stated below:

log-slow-queries = /var/log/mysql-slow.log
long_query_time = 5

The statements above will log queries taking longer than five second to the specified log file (/var/log/mysql-slow.log). Once finished editing your my.cnf file, restart MySQL by executing the command below:

service mysqld restart
 


Article Details
Article ID: 295
Created On: 12 Mar 2007 08:32 PM

 This answer was helpful  This answer was not helpful

 Back
 Login [Lost Password] 
Email:
Password:
Remember Me:
 
 Search
 Article Options
Home | Submit a Ticket | Knowledgebase | News | Downloads
Language:

Help Desk Software Help Desk Software By Kayako SupportSuite v3.60.04