07 Aug 2012
10 Dec 2013
Link to this post
I'm doing some eCommerce module development on Sitefinity and I've noticed that start-up time when running from Visual Studio is extremely slow. So I fired up SQL Profiler and discovered that Sitefinity is beating our database to death. On startup, it prepares and issues over 50,000 queries! Even when apparently idle it's issuing ~1,000 per second! There are so many it's hard to pin down the main culprits, but two frequent offenders are of the form:
exec sp_execute 1,@p0='9AEB5845-1B98-4669-8F18-3E51940B9EE0'
exec sp_execute 2,@p0='/Blogs',@p1='7D68C543-AE50-46F8-B70E-51038DE1CB11'
The GUIDs are different in every statement -- but I didn't check them all :-). I only caught the sp_prepexec statement for #1:
declare @p1 int
exec sp_prepexec @p1 output,N'@p0 uniqueidentifier',N'SELECT
[description_] AS COL1, [title_] AS COL2, [url_name_] AS COL3, [allow_comments]
AS COL4, [allow_track_backs] AS COL5, [app_name] AS COL6, [approve_comments] AS
COL7, [content_state] AS COL8, [date_created] AS COL9, [default_page_id] AS
COL10, [draft_culture] AS COL11, [email_author] AS COL12, [expiration_date] AS
COL13, [last_modified] AS COL14, [last_modified_by] AS COL15, [original_content_id]
AS COL16, [ownr] AS COL17, [post_rights] AS COL18, [publication_date] AS COL19,
[source_key] AS COL20, [status] AS COL21, [vrsion] AS COL22, [views_count] AS
COL23, [visible] AS COL24, [votes_count] AS COL25, [votes_sum] AS COL26,
[author_name_] AS COL27, [content_] AS COL28, [comment_status] AS COL29,
[commented_item_i_d] AS COL30, [commented_item_type] AS COL31, [email] AS
COL32, [ip_address] AS COL33, [provider_name] AS COL34, [website] AS COL35,
[voa_version] AS COL36 FROM [sf_commnt] WHERE [content_id] =
Any ideas? The slow response is making development miserable. I haven't profiled our production system but I have heard no complaints.