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...Some advanced querying by country...Some advanced querying by country...
Previous
 
Next
New Post
4/17/2009 6:05 AM
 

Stuart, 

I agree, that joining with serialized tables in SQL is not very fast, you should consider not to access tables but use business objects in your code instead. These will retrieve the user info and you are safe using an API, which will be unchanged, if the database structure is modified.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
4/17/2009 7:06 AM
 

Rodney Joyce wrote
 

Hi Stuart,

I am not answering your question, but I thought I'd mention the LocationSearch feature in my UserProfile module. It gusses the users location based on IP if they are  not logged in and yuo can drill up and down users by location. I plan to enhance my league module to use the same search querystrings so you can see all leagues, events, groups users etc. for a specific location.

 

 

 

Hi,

Where is this LocationSearch feature? Is this a dnn class or an actually option within the profile? Can't seem to find either.

Thanks

Drew

 
New Post
4/17/2009 10:52 AM
 

 

Sebastian Leupold wrote
 

Stuart, 

I agree, that joining with serialized tables in SQL is not very fast, you should consider not to access tables but use business objects in your code instead. These will retrieve the user info and you are safe using an API, which will be unchanged, if the database structure is modified.

Hi Sebastian

I'm not sure I get this... even if I use business object abstractions, surely I still need to run some database queries by country at some point? I agree I can layer things to protect myself from future DNN changes - but somehow I still need to optimise the database layer so that it works quickly enough to cope with thousands of users from across the globe? Or is there some way you are suggesting I can do this in managed objects above the database?

Confused...

Stuart

 

 
New Post
4/17/2009 2:53 PM
 

it depends on your needs, which reports you try - in some cases you will need to join on the database to get suitable results.

In this case I would first retrieve ID of the Profile Property and query by sth like SELECT FROM users INNER JOIN UserProfile WHERE propertyID = <value>", which should be fast enough. (of course, covered in a stored procedure for security).


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
4/17/2009 6:11 PM
 

Thanks again.

Sadly the evidence I'm seeing already (with only a 1000 users) is that a query similar to that is not fast enough - it needs to use an index not just do a brute force full text search every time. As it currently stands it also pulls too much data into RAM cache which then hurts the server - I'm on a GoGrid host and RAM is my main cost and restriction.

Looking at the details from the Query Analyser it says that one of the main reasons for slowness is the Table Scan over dnn_UserProfile - which is why I want to replace it with an Index Seek.... but I can't currently put an Index the PropertyValue because it's such a big field....

I'll have a think some more about how to handle this... I know I could just quickly redefine the table. Another option I'm considering is adding a stored computed column which contains a substring of the PropertyValue column - I could limit the size of this column to say 100 characters - which would then be indexable.

As for security... I'm currently mainly using LinqToSql rather than using StoredProcs - this does add a small overhead - but should also be quite secure in terms of sql injection at least

Thanks again for the comments

Stuart

 

 
Previous
 
Next
HomeHomeOur CommunityOur CommunityGeneral Discuss...General Discuss...Some advanced querying by country...Some advanced querying by country...


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