Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (General)
 Archive functions
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Stefan Falz
Starting Member

12 Posts

Posted - 13 December 2002 :  15:08:03  Show Profile  Visit Stefan Falz's Homepage
Hi,

i have a snitz forum version 3.4.03 (german) and today i want
to archive some topics (8.000 Topics and 45.000 Replys). The
function which inserts the data into the archive tables is
very very slow (and buggy). After 15 minutes (on a P IV 2 GHz
and SQL 2000) the database is corrupt. Therefore i have written
a new function which processes the insertions and deletions
in 15 seconds. Feel free to use the function in your forum.

http://www.aspforum.de/download/admin_forums.txt
(Not 100 percent compatible while using non standard variables,
but you should see, what it makes).

BTW: Sorry for my bad english ;)

I forgot one thing

You must change either FORUM_REPLY or FORUM_A_REPLY.
The structure of those tables is different. The column
R_STATUS is on another position. For the SQL-Statements:
INSERT INTO ... SELECT * FROM ... both tables must have
an identical structure.

Bye, Stefan

Edited by - Stefan Falz on 13 December 2002 15:17:21

davemaxwell
Access 2000 Support Moderator

USA
3020 Posts

Posted - 13 December 2002 :  15:09:52  Show Profile  Visit davemaxwell's Homepage  Send davemaxwell an AOL message  Send davemaxwell an ICQ Message  Send davemaxwell a Yahoo! Message
8,000 topics and 45,000 replies. Is that how many topics you have, or how many you archived?

Dave Maxwell
Barbershop Harmony Freak
Go to Top of Page

Stefan Falz
Starting Member

12 Posts

Posted - 13 December 2002 :  15:12:49  Show Profile  Visit Stefan Falz's Homepage
quote:
Originally posted by davemaxwell

8,000 topics and 45,000 replies. Is that how many topics you have, or how many you archived?



Archived. I archived all what is older than 3 months.

Bye Stefan
Go to Top of Page

Stefan Falz
Starting Member

12 Posts

Posted - 13 December 2002 :  15:15:37  Show Profile  Visit Stefan Falz's Homepage
I forgot one thing]

You must change either FORUM_REPLY or FORUM_A_REPLY.
The structure of those tables is different. The column
R_STATUS is on another position. For the SQL-Statements:
INSERT INTO ... SELECT * FROM ... both tables must have
an identical structure.

Bye, Stefan
Go to Top of Page

jlcox
Starting Member

7 Posts

Posted - 18 January 2003 :  16:35:59  Show Profile
Thanks for the code, Stefan. Instead of modifying my table structure, I simply listed the fields in the SQL statement, i.e.,

strSQL = "INSERT INTO " & strTablePrefix & "A_REPLY (CAT_ID, FORUM_ID, TOPIC_ID, REPLY_ID, R_STATUS, R_MAIL, R_AUTHOR, R_MESSAGE, R_DATE, R_IP, R_LAST_EDIT, R_LAST_EDITBY, R_SIG) " & _
"SELECT CAT_ID, FORUM_ID, TOPIC_ID, REPLY_ID, R_STATUS, R_MAIL, R_AUTHOR, R_MESSAGE, R_DATE, R_IP, R_LAST_EDIT, R_LAST_EDITBY, R_SIG FROM " & strTablePrefix & "REPLY " & _
"WHERE TOPIC_ID IN ( SELECT " & strTablePrefix & "A_TOPICS.TOPIC_ID FROM " & strTablePrefix & "A_TOPICS )"
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.19 seconds. Powered By: Snitz Forums 2000 Version 3.4.07