Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am getting a huge load on my linux servers because of this query. CPU is on 500% load & this query is causing load.

/usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --plugin-dir=/usr/lib64/mysql/plugin --user=mysql --log-error=/var/lib/mysql/ --open-files-limit=27990 --pid-file=/var/lib/mysql/

I donot have any restriction in my.cnf file. But this query is blowing my mind.

Killing this process id is shutting the SQL down. Please help.


migration rejected from Jun 2 '14 at 13:53

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

closed as unclear what you're asking by ypercubeᵀᴹ, Paul White, Phil, Mark Storey-Smith, Aaron Bertrand Jun 2 '14 at 13:53

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

show the SQL query that you are processing. Also show the database organization in tables, i.e. the database schema. Look also inside the log files. – Basile Starynkevitch Feb 2 '14 at 7:59
Use explain on the query and choose the correct indexes. See – Ed Heal Feb 2 '14 at 8:02
If you don't know which query is causing this, you can use a MySQL monitor like mytop to find it out. Alternatively you can just execute query show full processlist to check current running queries including time in second that they already have taken. – dragoste Feb 2 '14 at 9:01
I am using cPanel but tried mysqladmin processlist to find delayed queries. I got a few domains causing problem then i suspended those domains. But still I dint help me. – Amir Nasir Feb 2 '14 at 9:15