Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositorySlow Performance in 3.01.14 with only 200 Repository itemsSlow Performance in 3.01.14 with only 200 Repository items
Previous
 
Next
New Post
8/24/2008 11:40 AM
 

no it's not on the radar.  There are no plans for any future release of the Repository module on the 3.X platform.  The next release will be 4.0 and it is a complete rewrite of the module.  If you can come up with a better sproc, please feel free to post it here or send it to me for others to implement.

 
New Post
8/24/2008 10:40 PM
 

Ok, I can probably do that, but I, too, have been waiting for the new module..  :)

If there is any clue past this particular sproc on the performance issues, the help is appreciated.  I'm even willing to give you host access to the site if you'd be willing to take a peek (not that it'd help, really).  My client keeps harping on the performance, my host keeps telling me it's DNN and the Repository, and I'm just confused because everything seems to be working properly.  Oh, well..  :)

 
New Post
8/24/2008 10:48 PM
 

Another quick note: I am seeing it take more than a minute to load the edit form.  Not sure if there was something else I could look at here..  I'm thinking it has something to do with the sheer number of subcategories in each of the 6 or 7 main categories that get displayed, but not sure...

 
New Post
9/3/2008 10:14 PM
 

Steve,

I have re-written one of the procedures, but it hasn't made it any faster.  I am going to run some index analysis once I get a chance.  Here it is with no warranty whatsoever!

 

IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'{databaseOwner}{objectQualifier}grmGetRepositoryObjects') AND OBJECTPROPERTY(id,N'IsProcedure') = 1)
DROP PROCEDURE {databaseOwner}{objectQualifier}grmGetRepositoryObjects
GO

CREATE procedure {databaseOwner}{objectQualifier}grmGetRepositoryObjects
(
@ModuleID 	int,
@sFilter	nvarchar(256),
@sSort		nvarchar(100),
@Approved	int,
@CategoryId	int,
@Attributes	nvarchar(150),
@RowCount	int
)
AS

BEGIN
	set nocount on

	create table #keywords (keyword varchar(256))
	insert into #keywords
	select [value] as keyword from {databaseOwner}{objectQualifier}grmParseDelimitedStrings(@sFilter, '|')

	create table #objects (ItemId int)

	IF @CategoryId = -1
	BEGIN
		-- Filter by attributes only
		insert into #objects
		select a.ItemId
		FROM {databaseOwner}{objectQualifier}grmRepositoryObjects a
		WHERE a.ModuleID = @ModuleID
		AND a.Approved = @Approved
		AND (@Attributes = '' OR {databaseOwner}{objectQualifier}grmCheckAllAttributes(@Attributes,';', a.ItemID) = 1)
	END
	ELSE
	BEGIN
		-- Filter by category and attributes
		insert into #objects
		select a.ItemId
		FROM {databaseOwner}{objectQualifier}grmRepositoryObjects a
		INNER JOIN {databaseOwner}{objectQualifier}grmRepositoryObjectCategories b ON a.ItemID = b.ObjectID AND b.CategoryID = @CategoryId
		WHERE a.ModuleID = @ModuleID AND b.CategoryID = @CategoryId
		AND a.Approved = @Approved
		AND (@Attributes = '' OR {databaseOwner}{objectQualifier}grmCheckAllAttributes(@Attributes,';', a.ItemID) = 1)
	END

	IF @sFilter <> ''
	BEGIN
		-- Keyword search
		create table #objectsFiltered (ItemId Int)

		-- By Description
		insert into #objectsFiltered
		select distinct a.ItemId
		FROM #keywords k
		INNER JOIN {databaseOwner}{objectQualifier}grmRepositoryObjects a on a.Description like '%' + k.keyword + '%'
		INNER JOIN #objects o on a.ItemId = o.ItemId

		-- By Summary
		insert into #objectsFiltered
		select distinct a.ItemId
		FROM #keywords k
		INNER JOIN {databaseOwner}{objectQualifier}grmRepositoryObjects a on a.Summary like '%' + k.keyword + '%'
		INNER JOIN #objects o on a.ItemId = o.ItemId

		-- By Name
		insert into #objectsFiltered
		select distinct a.ItemId
		FROM #keywords k
		INNER JOIN {databaseOwner}{objectQualifier}grmRepositoryObjects a on a.name like '%' + k.keyword + '%'
		INNER JOIN #objects o on a.ItemId = o.ItemId

		-- By FileName
		insert into #objectsFiltered
		select distinct a.ItemId
		FROM #keywords k
		INNER JOIN {databaseOwner}{objectQualifier}grmRepositoryObjects a on a.FileName like '%' + k.keyword + '%'
		INNER JOIN #objects o on a.ItemId = o.ItemId

		-- By Author	
		insert into #objectsFiltered
		select distinct a.ItemId
		FROM #keywords k
		INNER JOIN {databaseOwner}{objectQualifier}grmRepositoryObjects a on a.Author like '%' + k.keyword + '%'
		INNER JOIN #objects o on a.ItemId = o.ItemId

		-- By Author Email
		insert into #objectsFiltered
		select distinct a.ItemId
		FROM #keywords k
		INNER JOIN {databaseOwner}{objectQualifier}grmRepositoryObjects a on a.AuthorEmail like '%' + k.keyword + '%'
		INNER JOIN #objects o on a.ItemId = o.ItemId

		-- Results
		IF @RowCount > 0
			SET ROWCOUNT @RowCount

		SELECT a.*, 
		(SELECT COUNT({databaseOwner}{objectQualifier}grmRepositoryComments.ItemID) FROM {databaseOwner}{objectQualifier}grmRepositoryComments WHERE {databaseOwner}{objectQualifier}grmRepositoryComments.ObjectID = a.ItemID) AS CommentCount
		from (select distinct ItemId from #objectsFiltered) o
		inner join {databaseOwner}{objectQualifier}grmRepositoryObjects a on o.ItemId = a.ItemId
		order by 
			case when @sSort = 'Name' then a.Name end asc,
			case when @sSort = 'Author' then a.Author end asc ,
			case when @sSort = 'Downloads' then a.Downloads end desc,
			case when @sSort = 'RatingAverage' then a.RatingAverage end desc,
			case when @sSort = 'UpdatedDate' then a.UpdatedDate end desc,
			case when @sSort = 'CreatedDate' then a.CreatedDate end desc
		
		drop table #objectsFiltered
	END
	ELSE
	BEGIN
		-- Results
		IF @RowCount > 0
			SET ROWCOUNT @RowCount

		SELECT a.*, 
		(SELECT COUNT({databaseOwner}{objectQualifier}grmRepositoryComments.ItemID) FROM {databaseOwner}{objectQualifier}grmRepositoryComments WHERE {databaseOwner}{objectQualifier}grmRepositoryComments.ObjectID = a.ItemID) AS CommentCount
		from #objects o
		inner join {databaseOwner}{objectQualifier}grmRepositoryObjects a on o.ItemId = a.ItemId
		order by 
			case when @sSort = 'Name' then a.Name end asc,
			case when @sSort = 'Author' then a.Author end asc ,
			case when @sSort = 'Downloads' then a.Downloads end desc,
			case when @sSort = 'RatingAverage' then a.RatingAverage end desc,
			case when @sSort = 'UpdatedDate' then a.UpdatedDate end desc,
			case when @sSort = 'CreatedDate' then a.CreatedDate end desc
	END

	set rowcount 0
	drop table #keywords
	drop table #objects
	set nocount off
END
GO

 
New Post
9/8/2008 10:28 PM
 

Steve,

I have reviewed my data again and the only thing I can see that could cause an issue is that the table that links objects to categories is about 3000 records long.  This doesn't seem like a lot and is bothering me quite a bit.  Yes, we have quite a few subcategories of a small set of 7 or 8 main categories.  We also have the 200+ items each in several of these categories, which means you might find the same item in multiple categories.  That in and of itself should not make this module as slow as it is.  I mean, you can easily see the performance suffering on the site I gave on this thread.  And, at that site, I am using the stored procedure I posted here.  I guess what I am saying is that I am out of ideas of where to look for performance gains.  I ran the indexing wizard when I had this new procedure and the indexes it recommended were only going to give a 4% boost in performance.  4% on a query that already takes 6+ seconds to run is not really a help...

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositorySlow Performance in 3.01.14 with only 200 Repository itemsSlow Performance in 3.01.14 with only 200 Repository items


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out