Hi Peter,
I’m using DNN 6.1 with DMX 5.3.8 and have some performance problems.
For example, I always have to wait about 10 seconds after each click on a treenode until new files and subfolders are loaded.
So I tried to find a solution for this and finally end up in database functions. I found some queries in the msssql-monitor that takes long time. This queries looks like ‘reload-functions’ for new Data (Entries, Subfolders).
All this queries with a significant long execution time have an inner join with the following subquery:
SELECT DISTINCT ep.EntryId FROM dbo.ALVIS_DMX_EntryPermissions ep
INNER JOIN dbo.ALVIS_DMX_Permissions pt ON pt.PermissionId=ep.PermissionId AND pt.PermissionKey='VIEW'
LEFT JOIN dbo.ALVIS_vw_DMX_ActiveUserRoles r ON r.RoleId=ep.RoleId AND r.UserId=@UserId
WHERE (ep.UserId=@UserId OR NOT r.UserId IS NULL OR ep.RoleId=-1)
This single subquery needs 2,4s for execution on the server. This explains to me the 10s response time in AJAX-Gui for loading subfolders, entries and details.
How can I improve the performance? Can I rewrite the SQL or change some database parameters?
Thanks