AvocadoSoftware.com

Software For Hardcore Developers
Welcome to AvocadoSoftware.com Sign in | Join | Help
in Search

Derick Baileys old blog archives - go to derickbailey.com for new contents

Performance issue in Community Server Photos.

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

 

Published Thursday, March 10, 2005 7:03 AM by dredge
Filed Under: ,
New Comments to this post are disabled

This Blog

Post Calendar

<March 2005>
SuMoTuWeThFrSa
272812345
6789101112
13141516171819
20212223242526
272829303112
3456789

Advertisement

News

this is my old blog archives - go to http://derickbailey.com for updates

Syndication

Advertisement

Powered by Community Server, by Telligent Systems