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

HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...GetAllUser InefficiencyGetAllUser Inefficiency
Previous
 
Next
New Post
9/8/2008 5:57 PM
 

 

I have a DNN build (4.8) that is experiencing problems that we have traced to the GetAllUsers stored procedure.  In this routine, all users are loaded into a temp table ordered by displayname. 

My problem is that I currently have over 13K users in the system (and growing to over 60k), and the sort on displayname is sucking up resources big time.  On first glance, adding an index on displayname might take care of the problem, but I am wondering if perhaps there might be a better solution.  Using a temp table seems to be a kinda weak solution in this instance.

Any input would be appreciated.... TIA!!!

 

 
New Post
9/8/2008 6:54 PM
 

Hi David,

I was actually looking over this stored procedure a couple days ago and drew the same conclusions.

The temporary table is being used to implement paging at the data layer.  With SQL Server 2000, my recollection is that the preferred method was to avoid the temporary table and use a query of the form

SELECT ..., (COUNT(*) FROM ... WHERE CountTable.ID < OuterTable.ID) ...

However, I haven't done any specific benchmarking between these two methods in a LONG time.

With SQL Server 2005, judicious use of the ROW_NUMBER function would make this query very fast.  Unfortunately, (I assume) the core team wants to continue supporting MSSQL2000, so I wouldn't expect to see this implemented anytime soon.  That doesn't mean you couldn't adjust your installation though!

Brandon


Brandon Haynes
BrandonHaynes.org
 
New Post
9/8/2008 7:32 PM
 

on dotnetnuke we have over 600,000 usernames and this proc can be ran - it's slow, but the sql server has sufficent resources to get the list, perhaps your server requires more RAM or more harddrive space (temporary tables and group/sort operations use the tempdb as temporary storage and if it doesn'tn have enough free space it can cause issues). I dont think adding an index would do any harm here, the table is mostly read and not write.

Cathal


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...GetAllUser InefficiencyGetAllUser Inefficiency


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