differences among these states?
The MySQL Documentation provides a list of those states.
From your MONYog graph, here are the states:
Sending data
The thread is reading and processing rows for a SELECT statement, and sending data to the client. Because operations occurring during this this state tend to perform large amounts of disk access (reads), it is often the longest-running state over the lifetime of a given query.
Copying to tmp table
The server is copying to a temporary table in memory.
Sorting result
For a SELECT statement, this is similar to Creating sort index, but for nontemporary tables.
freeing items
The thread has executed a command. Some freeing of items done during this state involves the query cache. This state is usually followed by cleaning up.
Why "sending data" is taking 76%?
As the Documentation says, data is being sent to the client.
What would attribute to the high load ?
- Queries that return lots of rows
- Lots of queries
Queries that return lots of rows
If you have queries returning lots of rows, tune your queries to return less data, perhaps adding effective WHERE and LIMIT clauses to SELECTs.
Lots of queries
If you do not have queries returning lots of rows, then it must be lots of queries. You may find this surprising, but MONYog queries mysqld for the global status variables with either
SHOW GLOBAL VARIABLES;
or
SELECT * FROM information_schema.global_status;
These constitute queries as well.
Perhaps you could configure MONYog to retrieve status information less often.
Sending data
is not a very accurate description, since it means a lot more things than actually/only "sending data," as Rolando's answer, below, points out: "the thread is reading and processing rows." A full table scan will also display this state, even though the server may not actually be "sending" anything at all. Have you examined the slow query log for queries that need optimization? – Michael - sqlbot Feb 11 at 22:10