Author |
Topic  |
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
cult_of_frank
Starting Member
Canada
20 Posts |
Posted - 28 August 2008 : 06:32:58
|
Fixed, sleepy time so no rush but many many thanks.< |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 28 August 2008 : 06:39:43
|
quote: Originally posted by cult_of_frank
Oh, before you get too busy, what's a stored procedure??
A stored procedure is a bunch of SQL code stored in the database that has a name and can have parameters and you can execute it from several different places, simply by "calling it" by name. It's a concept similar to a function or procedure in a normal programming language.
How do you interact with your database?< |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
cult_of_frank
Starting Member
Canada
20 Posts |
Posted - 28 August 2008 : 06:53:41
|
Heh, with difficulty. :)
There's a tool called MyLittleAdmin for SQL Server that lets me do the basics.< |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 28 August 2008 : 06:58:48
|
That happens because you don't have Enterprise Manager, or does you host has it installed in your server? More important, does it allow you to run SQL Scripts, such as creating stored procedures?< |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
cult_of_frank
Starting Member
Canada
20 Posts |
Posted - 28 August 2008 : 13:44:20
|
No, sadly no Enterprise Manager. Made the migration from Access very painful... I'm waiting to hear back on the stored procedures from support.
As for the memory allocation, apparently 100 MB is what I get. Seems pretty small, eh?
Incidentally, would I have better search results with full text turned on or would that really rough up my memory usage? I'm sure it's CPU intensive or at least initially, but?< |
 |
|
HuwR
Forum Admin
    
United Kingdom
20600 Posts |
Posted - 28 August 2008 : 13:49:03
|
100Mb should be plenty. The server that this site runs on only uses around 500Mb and there are 50+ websites on it, some of which are very busy sites.< |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
|
HuwR
Forum Admin
    
United Kingdom
20600 Posts |
Posted - 28 August 2008 : 15:51:08
|
quote: Incidentally, would I have better search results with full text turned on or would that really rough up my memory usage?
it wouldn't make any difference to the amount of memory your website uses, SQL server uses it's own memory to perform queries.< |
 |
|
texanman
Junior Member
 
United States
410 Posts |
Posted - 28 August 2008 : 18:31:26
|
quote: Originally posted by ruirib
More important, does it allow you to run SQL Scripts, such as creating stored procedures?
Yes, it does.< |
 |
|
Etymon
Advanced Member
    
United States
2396 Posts |
Posted - 28 August 2008 : 23:46:21
|
Once you get your tables straightened out and if it will help you archive your topics in smaller segments, you may want to try what I do below for big forums. You should try the code on a test database first to see if it is what you want. Also, if you want to divide it up in even smaller segments like days, hours, minutes, etc. that can be done also.
In admin_forums.asp under Case "archive" where you have:
You can comment that out and place this below it:
The above code divides the archiving up into weeks (1-52) and then months (1-72). Both show the date to be archived so you don't lose your place while archiving.< |
Edited by - Etymon on 28 August 2008 23:51:51 |
 |
|
cult_of_frank
Starting Member
Canada
20 Posts |
Posted - 29 August 2008 : 04:17:19
|
That looks pretty handy, actually... so I can pop this code in and archive for a year and it will break it into incremental pieces? Why are months 72 though?< |
 |
|
Shaggy
Support Moderator
    
Ireland
6780 Posts |
Posted - 29 August 2008 : 04:24:42
|
So you can archive up to 6 years in a go, if you wish.
< |
Search is your friend “I was having a mildly paranoid day, mostly due to the fact that the mad priest lady from over the river had taken to nailing weasels to my front door again.” |
 |
|
ruirib
Snitz Forums Admin
    
Portugal
26364 Posts |
Posted - 29 August 2008 : 04:30:59
|
I will post the new code to the archiving function and all that splitting won't be needed anymore. The difference between the code I'll post and the existing Snitz code is that the new code uses bulk inserts and deletes, while the current code treats records to archive one by one. Another feature of the new code is the use of transactions. If you have tried to archive before and the operation failed you will likely have duplicate topics or replies and that may cause new archive attempts to fail. With the new code, transactions are used, so everything done till the point of failure will be reverted, in case of error.
I will need some time to test it, though. I will need to change the SQL for the archival of replies, to handle your differences in table structure and I always test the code I post, to minimize the possibility of code errors.< |
Snitz 3.4 Readme | Like the support? Support Snitz too |
 |
|
Etymon
Advanced Member
    
United States
2396 Posts |
Posted - 29 August 2008 : 05:01:41
|
Thanks guys. I'm glad you might find it useful. 
The main reason for 72 months is for sites who start out small and just rarely archive. It also helps with doing archiving gradually.
Another reason for months as well as the 52 weeks is that on shared hosting the memory, to run a script that takes a while to process, the archive would often fail and produce duplicate posts like Rui mentioned.
I find that with the increments, I am able to work my way up the ladder. I haven't gotten any timeouts ... yet. Also, I know where I am as I am archiving. I do this method on one forum at a time. This is on dbs with about as many posts as your cult_of_frank.
It's a lot of work to bring a site up to date this way, but it's really not that big of a deal once it's done especially compared to removing duplicates which is what I do first. < |
Edited by - Etymon on 29 August 2008 05:05:46 |
 |
|
Topic  |
|