1

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 ?

0

3 Answers 3

1

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

SHOW FULL PROCESSLIST

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)

1
  • 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, 2009 at 10:08
1

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.

0

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 !

You must log in to answer this question.