Server Fault is a question and answer site for system and network administrators. 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

While executing SQL Scripts, mysqlnt.exe uses 50% of CPU . Even there is no access, the CPU usage doesn't come down. Any solution for this ?

share|improve this question

migrated from Dec 22 '09 at 10:14

This question came from our site for professional and enthusiast programmers.

You most likely have a dual core machine, and some MySQL session is using 100% of one of your cores/processors.

Open the MySQL command line client, and issue a


to see what sessions are currently running, what they are doing, and how long they are doing it. If you get a feeling who de culprit is, and you can safely abort it, Issue a

KILL ###

Where ### is the number of a session (found in the Id column of the SHOW PROCESSLIST output)

share|improve this answer
I've killed the unused threads. There is only 4 live connections right now. But still the the process eats 50% of the box ? Is there anything I need to change in the "Start up variables" section ? – Vinoj Dec 22 '09 at 10:08

The best way is to diagnose what query is causing the problem, you should probably optimize it and add some indexes on questioned table.

Use SHOW FULL PROCESSLIST for getting list of processes and then run it with EXPLAIN to see why it takes so long.

share|improve this answer

try to make indexing on your table - also you need to make some performance - tunning on your query - so which makes it much faster :-) optimize it - I'm agree with Michal Chihar !

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.