YAFLogo

Posted by: minhsangd - Tuesday, 18 January 2011 08:37:03
i dont know why my database is too large. I had 5000 Record in yaf_Message Table and 5000 record in yaf_Topic table, the Database size is 140 MB+, but my friend used vbb source and had 13.000 record thread and 13.000 record message but the size of his database is 200MB+ is this a problem or bugs? P/S: i wrote a page to leech thread or message from the other forum and website to my databse, i used Stored Proceduce (topic_save)to post new topic and message.... so is that reason why is database is too large? [cursing]

Posted by: squirrel - Tuesday, 18 January 2011 12:29:31
[quote=minhsangd;46155]i dont know why my database is too large. I had 5000 Record in yaf_Message Table and 5000 record in yaf_Topic table, the Database size is 140 MB+, but my friend used vbb source and had 13.000 record thread and 13.000 record message but the size of his database is 200MB+ is this a problem or bugs? P/S: i wrote a page to leech thread or message from the other forum and website to my databse, i used Stored Proceduce (topic_save)to post new topic and message.... so is that reason why is database is too large? [cursing][/quote] You need to look into SQL database maintenance, such as backup. Depending on the recovery model of your database, your logfiles will grow, causing higher database size. We have 185,502 posts in 19,058 topics in 13 forums with a member count of 1800+ and our DB uses about 250mb. But I have not run backup and shrink lately which cleans up 'unused space' and 'log space'...

Posted by: minhsangd - Tuesday, 18 January 2011 13:33:47
i run YAF in Local.... i looked into Message Table, and the size is 125MB+...... :-?

Posted by: minhsangd - Tuesday, 18 January 2011 13:42:14
and now with 8000 Message and 8000 Topic.... the size of Database is 200MB @@.... the problem is Yaf_Message Table is 195MB+.... i looked into and there is no point >"< P/S: i'm running YAF in Local, Visual Studio 2010 , MsSQL 2005

Posted by: squirrel - Wednesday, 19 January 2011 02:46:02
[quote=minhsangd;46160]and now with 8000 Message and 8000 Topic.... the size of Database is 200MB @@.... the problem is Yaf_Message Table is 195MB+.... i looked into and there is no point >"< P/S: i'm running YAF in Local, Visual Studio 2010 , MsSQL 2005[/quote] Again, you need to check your database recovery model. SQL will count the transaction logs as part of a table size. If your table is tracking lots of transactions (IE you have imported a large amount of topics), your transaction log will be quite large, this consuming lots of space. You should also try running a FULL backup of the database, then run a SHRINK on the database once the backup has completed, then check your table sizes again. When I imported the above forum into YAF from Snitz, I had a database that was over 450 megs after the import scripts were run. I then dropped the Snitz Tables, ran a backup, then a shrink, and we were down to 190mb.

Posted by: Dimi - Saturday, 22 January 2011 03:25:44
[quote=squirrel;46173][quote=minhsangd;46160]and now with 8000 Message and 8000 Topic.... the size of Database is 200MB @@.... Again, you need to check your database recovery model. SQL will count the transaction logs as part of a table size. If your table is tracking lots of transactions (IE you have imported a large amount of topics), your transaction log will be quite large, this consuming lots of space. You should also try running a FULL backup of the database, then run a SHRINK on the database once the backup has completed, then check your table sizes again. When I imported the above forum into YAF from Snitz, I had a database that was over 450 megs after the import scripts were run. I then dropped the Snitz Tables, ran a backup, then a shrink, and we were down to 190mb.[/quote] Absolutely right! The recovery mode is critical to the database size. We do NOT have a full recovery mode enabled on our working database. I'm not talking about YAF related database, it's absolutely different one related to medicine. It's MS SQL Server 2008 and the current database size is Half-a-Terabyte. If it's not a problem with server space or Internet Provider limitation, I would not bother with the database size. 150 or 200 MBytes is not critical and it's not a huge difference anyway! Btw, people, are you saving the attachments inside the database? I initially switched to files and I'm getting a huge sub-directory with all the attachments. There is a little trouble to backup these files, but that's all. it's much harder to keep the huge database sharp. [b]There is a question for the developers![/b] If someone swtiches from using database table for attachments to separate files, what's gonna happen? Will he lose all the files, or the forum will combine both showing the attachments corectly and all the next attachments will be saved according to the selected option?