My query
./mysqlslap --user=root --concurrency=50 --iterations=1 --pass=toor -vv --create-schema=db --query="SELECT SQL_CALC_FOUND_ROWS wp_posts.* FROM wp_posts INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) INNER JOIN wp_term_taxonomy ON (wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id) WHERE 1=1 AND wp_term_taxonomy.taxonomy = 'category' AND wp_term_taxonomy.term_id IN ('1') AND wp_posts.post_type = 'post' AND (wp_posts.post_status = 'publish') GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 35, 6"
Some results
Average number of seconds to run all queries: 68.904 seconds
Minimum number of seconds to run all queries: 68.904 seconds
Maximum number of seconds to run all queries: 68.904 seconds
Number of clients running queries: 50
Average number of queries per client: 1
The load average peaks above 32.
The specs of the test machine are:
- 4GB RAM
- E6550 @ 2.33GHz (2 core)
- Single SATA disk
- Debian Lenny + Apache + PHP + MySQL
The MySQL config can be read over here. Does anyone have advise on how I can adjust then to improve performance? Thanks.