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

HomeHomeDevelopment and...Development and...SQL and SQL Ser...SQL and SQL Ser...Indx Fragmentation????Indx Fragmentation????
New Post
2/17/2011 10:26 PM
Our site has been very slow. The host said we should migrate to SQL2008, which I fumbled through with a little help from you guys. It is still slow. Now they say:

Thank you for contacting Technical Support.  I understand that you are seeing site slowness.  I have looked at your site and I am seeing what you are complaining about.  This could be caused by index fragmentation on your DNN tables.  Indexes usually help to speed up data queries to the tables, but if there is any significant fragmentation it could actually slow things down.  You may want to look into having those tables' indexes reorganized or rebuilt.

Well, I am not sure what that means, but I will start reading around on the net, and I am starting by asking here if this is credible, and if it is something I can handle

Visit our Website at
New Post
2/17/2011 11:04 PM
Credible, yes, accurate, perhaps.

Indexes are (sort of) like shortcuts to database content that SQL uses to increase performance. When database content changes by getting updated, inserted, deleted and such, the indexes change to keep track. An index is stored in "pages" and just like any other disk-based data, can get spread out physically so that reading through an index becomes itself not the very quick activity.

It's a good idea to defragment or even better rebuild every index in your database. Since they are always objects attached to tables, you can loop through the tables in your database and rebuild each index associated with the table.

Rebuilding takes a bit more resource than just defragmenting, but it does a more complete job. If you have a large or heavily used database, schedule this to take place when usage is low, such as the middle of the night.

For best results, it is good to follow the defragmentation of indices on a database with physical defragmentation of disk. If you don't have control of that, such as on a shared hosting environment, you can ask your host how often disk defragmentation is scheduled.

Here is a script you can run on your database ... connect to the database using SQL Server Management Service, and run this.

There are two instances of the text "MyDatabaseName" in this script - one right at the beginning, and the other embedded .... be quite careful to replace each of these with the name of your database.

You can run this manually once in a while, or schedule it. It will be interesting to see if this improves your website performance.

USE MyDatabaseName
DECLARE @fillfactor INT

SET @fillfactor = 90

   SET @cmd = 'DECLARE TableCursor CURSOR FOR SELECT table_catalog + ''.'' + table_schema + ''.'' + table_name as tableName  
                    FROM MyDatabaseName.INFORMATION_SCHEMA.TABLES WHERE table_type = ''BASE TABLE'''  
   EXEC (@cmd) 
   OPEN TableCursor  

   FETCH NEXT FROM TableCursor INTO @Table  

       SET @cmd = 'ALTER INDEX ALL ON ' + @Table + ' REBUILD WITH (FILLFACTOR = ' + CONVERT(VARCHAR(3),@fillfactor) + ')' 
       EXEC (@cmd) 

       FETCH NEXT FROM TableCursor INTO @Table  

   CLOSE TableCursor  
   DEALLOCATE TableCursor 

by the way, the suggestion to move to SQL Server 2008 from SQL 2005 as a prescription to cure slow performance ... while moving to 2008 has some benefits, this kind of increased speed is not automatically one of them. if defragging or rebuilding indices on 2008 cures the problem ... the same would probably have cured the problem on SQL 2005 as well.

New Post
2/18/2011 2:06 AM
most likely, there are other causes for your performance issues - either a huge transaction log and in many DNN versions, a grown eventlog table may affect performance as well. please read my blog post:

Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
New Post
2/18/2011 2:17 PM
Looking for someone that can take the .bak file from our SQL2008 database, re-index (and remove some stuff from khz), and back it up so we can update the database for the site. I tried, but was using 2005 Express. I uninstalled and installed SQLManagementStudio_x86_ENU.exe which eventually installed as SQL Server 2008. I cannot for the life of me figure out how to get it to start a new database so I can imort the backup file from the website. It keeps looking for local servers (don't have any), and I don't want to connect it to the databse on the site. Ideas? Consultants? Should I just quit trying to run a website when I really don't know anything about programming?

Visit our Website at
New Post
2/20/2011 1:41 AM
If you provide an email address, I'll get in touch with you and see if i can help.

HomeHomeDevelopment and...Development and...SQL and SQL Ser...SQL and SQL Ser...Indx Fragmentation????Indx Fragmentation????

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