Join our DNN Community    (Newsletter, Tips, Tricks and Forums for DNN Skins & Modules)

 


 
Microsoft Gold Certified Partner - DNN Benefactor

DotNetNuke Powered! 


Friday, December 05, 2008 Register · Login · Contact · Search:  
Company Solutions Portfolio Contact
Forums
Tips and Tricks
Discussion of the popular 'Tips and Tricks' from the Newsletter. Questions or comments regarding the provided tips, or other general tricks of the trade.
Subject: Sluggish Site Settings
You are not authorized to post a reply.
 
Author Messages
kevinmschreiner
Please Wait...
Posts:749

10/04/2005 2:38 PM Alert 
In our recent endeavors, we have come across two specific instances of DotNetNuke sites which for were exhibiting some very long delays in opening some of the administrative tabs- with the largest delay occurring on the Site Settings tab.


After looking in to the problem, and running some diagnostics on the site one major problem was identified. Something in the history of the site, whether it was an upgrade from an older version of DotNetNuke, or a third party module installation caused a huge number of duplicate records to be generated within the FolderPermission table.

The FolderPermission table is queried upon every request on the Site Settings tab, to determine the Read and Write access for the folder for the roles assigned to the currently logged in user. Typically only two records would be returned for the Administrative user - because only 2 unique records should have existed for that role on the folder that was requested.

One of the sites we were analyzing returned nearly 2,000 records for each request. Since the site had nearly 15 skins, each skin folder was checked for permissions and these requests were returning in two to three seconds instead of a fraction of a second.

One look at the FolderPermission table said it all - the table had over 73,400 records within it, of which only 192 were truly unique. So the correction to the issue was actually really simple and could be handled by executing a quick SQL script with the Host SQL tab.

If you are having a similar issue - go ahead and try this script on for size. Note, this script does not include the owner or qualifier of the database, so if your database required either - modify the script to work with your specific installation.

 

--* CREATE THE TEMPORARY TABLE
create table #FolderPermission
    ( 	FolderID int, 
PermissionID int,
RoleID int,
AllowAccess bit )
--* POPULATE THE TEMPORARY TABLE WITH THE UNIQUE RECORDS
INSERT INTO #FolderPermission 
SELECT DISTINCT
folderid,
permissionid,
roleid,
allowaccess

FROM
FolderPemission
--* TRUNCATE THE OLD TABLE
TRUNCATE TABLE FolderPermission
--* REPOPULATE THE OLD TABLE
INSERT INTO FolderPermission
(
FolderID,
PermissionID,
RoleID,
AllowAccess
)
SELECT
FolderID,
PermissionID,
RoleID,
AllowAccess
FROM #FolderPermission
--** CLEAN UP
DROP TABLE #FolderPermission

Kevin M Schreiner

Business Intelligence Force, Inc. (bi4ce)
You are not authorized to post a reply.
Forums > Dotnetnuke > Tips and Tricks > Sluggish Site Settings



ActiveForums 3.6
Latest Post
 
At R2integrated (formerly Bi4ce), we take support seriously.  That's why we support our customers and DNN community with daily monitoring from our experienced engineering team.  We ask that the first step taken is to read the relevant documentation and support forums prior to submitting any questions that may already be available or have been answered.  We ask that you review the documentation that we provide for our products before posting a question.

The Forums are for our customers to chat, exchange ideas and strategies, and submit feedback.  Please be sure to perform keyword searches for previous related forum responses.

To be helpful when submitting a new item, please include the following: 
  1. DNN Version
  2. Module Version
  3. Admin Log Viewer Information
  4. Environment detail: Operating system, .NET framework version, database and version, IIS version, Browser version (if appropriate)
We always try to respond quickly and monitor the forums daily during business hours (EST).  Occasionally, requests for a specific project requirement may not apply for the free support offered. For project specific support please submit via our Information Request form.

Thank you for using our Forums.

Click here to register for the Forums
 
© 2008 by R2integrated (formerly Bi4ce) | DNN® is a registered trademark of DotNetNuke Corporation