Eivind M wrote
Ok, but I am only displaying 20 - 30 modules per page, so I guess the large number of modules in the db should not affect the response time of the page (if caching is properly implementet).
But will the use of a CMS module decrease the number of modules in the db? Could you give me a tip on a CMS module that I could check out for this purpose?
Thanks!
One of the problems you have here is terminology. Module is a massively overloaded term : meaning everything from something you download from DNN Forge, to something you put on a page to a piece of content displayed in a pane.
If you've got 40,000 modules on your Modules table, then that means you've installed that many individual modules (be they text/html, or whatever) into your site. The number of different module definitions tends to be immaterial (I can't see that you've compiled 40,000 different module dlls). As Sebastian has said, you're using the wrong model to display your content. If you have 20 modules per page, and 2000 pages on your site, then you're probably using the wrong architecture. There is an overhead to each loading of a module into a pane, and each page into the site. You would be better off with, say, an articles module dropped once onto one page, and then managing 2000 different entries or something like that. You could concentrate on the database tuning to ensure that you're getting modules back from the database quickly and efficiently, and it should all run withouth any problems.
I suspect you're using some sort of automatic module creation tool, because there's no way anyone has sat their and clicked 'add module' 40,000 times. This is probably at the root cause of your problem, and doing some custom coding to display content in another way would be better.