MySQL Forums
Forum List  »  Performance

Re: Monitoring large resultsets
Posted by: Jerome Benezech
Date: July 12, 2012 12:22AM

I was more looking for queries retrieving large resultsets than slow queries.
There are many problems, one of which is that the php code is joomla and therefore extremely poorly optimized on the SQL side.
I had enabled the slow log and although this is useful and points to needed optimization, slow queries have a lot to do with good indexing and corresponding syntax. For example, a lot of the queries I see in the log are select count(id) which return only 1 int row but take 6s when the server is busy.

To explain myself a bit more. The MySQL server has a cache size of 2GB but there is a lot of pruning and the free memory goes up and down a lot.
On the php size, I see php processes holding over 100MB of memory.
I suspect some queries are retrieving huges resultsets. Cache is pruned because it cannot hold results of that size. Php holds the results array in memory.

Options: ReplyQuote


Subject
Views
Written By
Posted
2197
July 10, 2012 10:26PM
1200
July 11, 2012 02:01AM
Re: Monitoring large resultsets
1006
July 12, 2012 12:22AM
975
July 12, 2012 02:19AM
1025
July 12, 2012 03:37AM
1017
July 12, 2012 04:13AM
1068
July 12, 2012 05:49AM
1208
July 12, 2012 07:02AM
1025
July 13, 2012 07:50PM
1016
July 14, 2012 02:43AM
977
July 12, 2012 08:13AM
986
July 12, 2012 08:55AM
1059
July 12, 2012 12:12PM


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.