Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

truncate tables jforum_search_*

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, i need migrate the database jforum, but some tables have a lot of records like 4 tables jforum_search_*. I need to know if i can purge the data of this 4 tables without compromise Jforum system.

Thanks
[originally posted on jforum.net by feusebio]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes you can. However, I suggest you to migrate to JForum 2.1.8, who has a complete new search engine.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes it's my interest migrate to 2.1.8, there are more tables that i can truncate, or only this four jforum_search_*, my jforum_topics_watch table is the bigest.

Thanks
[originally posted on jforum.net by feusebio]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, topics_watch is good to keep, as it is used to notify users when an reply is sent.

As a curiosity, how big is your forum?

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think it isn't so big, i have:
1300 users
42400 posts
and the biggest table: jforum_topics_watch = 419400 records
[originally posted on jforum.net by feusebio]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hmm.. looks like there are duplicated records. I have a forum with half a milion posts and 50k users, and the number of records in topics_watch is less than 100k.

You may want to check it for duplicates:

http://garrettsmith.info/2006/10/31/find-duplicate-records-using-mysql/
http://www.databasejournal.com/features/mysql/article.php/2201621
http://forums.mysql.com/read.php?97,73460,73682#msg-73682

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For now i use a DB Postgres, but i will migrate to Mysql. I checked the duplicate records, and you are right, i have too much duplicate records. How can this happenen? It's a some bug with JForum?
The table jforum_topics_watch, don't have defined a pair keys to prevent this for field topic_id and user_id.
[originally posted on jforum.net by feusebio]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have seen this bug, but could not find why it happens, as before each new record JForum does a checking to see if it is indeed a new record.

In the first versions of JForum the "watch this topic" link performed the action without asking any confirmation to the user, so then I changed it to ask before adding (probably in 2.1.7, but don't know for sure).

Anyway, remove the duplicate records, and keep a watch in this table.

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic