Previous Thread
Next Thread
Print Thread
Hop To
#251727 12/25/2012 8:09 AM
Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
When I split my one big forum up into two smaller forums, I pruned away the excess topics in each smaller forum.

So for example in one smaller forum I now have only 8748 posts.

However, the ubbt_import_map file still has 157326 entries in it.

How can I prune down that import map file? Should this be automatically done when the posts are pruned?


Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Jun 2006
Posts: 16,299
Likes: 116
UBB.threads Developer
UBB.threads Developer
Joined: Jun 2006
Posts: 16,299
Likes: 116
You'd have to do it manually; that file just holds the post id's from your import from v6 (UBB.Threads or UBB.Classic) and isn't really touched by v7 unless via the importers.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Joined: Apr 2007
Posts: 3,940
Likes: 1
SD Offline
Former Developer
Former Developer
Joined: Apr 2007
Posts: 3,940
Likes: 1
i usually empty that table. it serves no real purpose, once your site has been running threads 7.x for awhile.

your SEO has probably been re-established in 7.x anyway, so no need for any redirects, anymore.

and it eliminates another overhead.

Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
SD - I believe I emptied that table on the BellaOnline forum a few years ago. I think I had to make a code change to stop errors after that. I also think it caused some issues with broken links. In the forums themselves people often refer to another thread for more information. So I believe those referral links made when we were running v6 stopped working. So I think I'd like to keep the import map here so that doesn't happen.

If it's keyed on post ID, and there's no other concerns, then I'll run a query to look for any rows that don't have a matching post ID in the live posts table, and delete those. That sounds like it'll do what I need and speed things up further.


Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts
Joined: Jun 2006
Posts: 693
Addict
Addict
Joined: Jun 2006
Posts: 693
OK here's the steps I took in case someone else wants to do this.

verify data -
select count(*) from ubbt_import_map where post_id not in (select post_id from ubbt_posts);
156289 posts

prepare for delete based on post ID -
Added post_id primary key to ubbt_import_map

remove obsolete rows -
delete from ubbt_import_map where post_id not in (select post_id from ubbt_posts);
removed 156289 rows

optimize table -
size in db tools – started at 3mb
optimized – now at 64k

Let me know if you have any questions!


Lisa Shea, owner, BellaOnline.com
BellaOnline Website
BellaOnline Forums - UBB since Apr 2002 - 58,000 members / 850,000 posts

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
spam issues
by ECNet - 03/19/2024 11:45 PM
Who's Online Now
1 members (Ruben), 866 guests, and 176 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20230217)