Via QGYen.NET, anyone running Community Server photos needs to apply the script that ken posted, to fix a stored procedure for performance reasons.
The cause of the problem? The procedure was using some inefficient SQL in order to get the total number of posts and the most recent post date in it and a total of all of its subcategories. Namely, it was using a couple of subqueries (meaning query within a query within a query), the IN clause, and a “select top 1 … order by postdate desc” in a few of the subqueries. On one database with ~95 categories and ~4000 pictures, this command could take almost a minute to execute.
The solution? We updated the sproc to use max(PostDate) instead of the top/order by. This brought the execution time down to ~1 second. We also changed all the subsubqueries and IN clauses to be inner joins. Doing this brought the execution time down to <1 second. On my own site, which has about 50 categories and around 900 pictures, execution time went from 4 seconds to <1 second.
Fix for Gallery scaling issue in Community Server v1.0