performance enhancements
List posts in the topic
performance enhancements
msg# 1
Here are some suggestions for performance enhancements that I feel should be included in your code. With a heavily loaded myAlbum-P install we were experiencing some very high database loads. Having looked into the cause of the load some slow queries showed themselves to be the culprits.
In index.php, viewcat.php and include/search.inc.php there are queries which access the xoops_myalbum_photos table joined with some other tables. These queries "ORDER BY" the date field which is not indexed. If you run these queries against a large dataset the query time is far too high.
I added an index on the date field but mysql still insisted on using the index on the status column, so I added "USE INDEX(date)" after the photos table. This gave a dramatic performance improvement.
On a heavily loaded database server (Dual 3GHz Xeons with 8Gb RAM) the query execution time dropped from between 8 and 27 seconds to between 0.02 and 0.1 seconds.
I hope you will make these simple changes.
Regards,
Nick
Votes:1
Average:10.00
Posts tree