MySQL Forums
Forum List  »  Performance

Re: Setting group_concat_max_len
Posted by: Rob Reid
Date: June 04, 2010 10:09AM

Well its all important criteria and the slow query log is useful for determining queries without adequate index coverage or slow runners but you can have legitimate long running queries that have good index coverage that might not get spotted.

For example I have just discovered a related posts plugin on wordpress that was murdering my webservers CPU and during bulk post imports the server load average was constantly going above 2+ on average its 0.02.

The queries themselves were covered by indexes but the SQL was complex, multiple left joins, unions and full text pattern matching on multiple words which resulted in temporary tables etc.

It was only when I ran mytop and top next to each other, killed all other traffic to my site and ran an import which enacted the plugin that I could see the problem in action e.g high MySQL CPU 100%. This then in turn caused the website to load very very slowly.

I have de-activated the plugin and rewrote my own version which works just as well with none of the overhead however it has taken me a while to get to the bottom of it. If there were CPU, Memory and I/O counters available like there are in SQL Server then it would have been spotted earlier as its a key performance indicator that I look for in queries along with high memory usage, I/O, blocking, index coverage, long query times etc.

For example take a look at this SQL Server performance report on my site > http://www.strictly-software.com/scripts/downloads/database_performance_script.txt

its a wonderful report that I run on any MSSQL server to give me 10+ useful reports e.g
1. Causes of the server waits
2. Databases using the most IO
3. Count of missing indexes, by database
4. Most important missing indexes
5. Unused Indexes
6. Most costly indexes (high maintenance)
7. Most used indexes
8. Most fragmented indexes
9. Most costly queries, by average IO
10. Most costly queries, by average CPU
11. Most costly CLR queries, by average CLR time
12. Most executed queries
13. Queries suffering most from blocking
14. Queries with the lowest plan reuse

If there were similar DMV's or server variables in MySQL it would be great and in terms of performance tuning more stats is definitely better.

Options: ReplyQuote


Subject
Views
Written By
Posted
18802
May 25, 2010 04:00PM
3519
May 28, 2010 07:18PM
3001
May 29, 2010 10:33PM
3966
May 30, 2010 04:48PM
2362
May 30, 2010 06:43PM
2237
June 04, 2010 06:27AM
2031
June 04, 2010 07:10AM
Re: Setting group_concat_max_len
3867
June 04, 2010 10:09AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.