The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Joined table update query
Hello,
I've ran a thread prefixes mod since 2007. Now that I have moved to vB4 I no longer wish to use it or modify that mod to become compatible, nor do I wish to use vB4's prefix system. The mod added a new field in the tread table called threadprefix. I no longer wish to this prefix system and have thus performed a query that copied the prefix from thread.threadprefix to thread.title: update thread set title = CONCAT(threadprefix,' - ',title) where threadprefix !='' That worked well, the query changed 400,000+ thread titles in 300 seconds. However, I'd also like to update the post title of each first post with the prefix and came up with the following possibilities: update post left join thread on thread.firstpostid = post.postid set post.title = CONCAT(thread.threadprefix,' - ',post.title) where thread.threadprefix !='' and thread.firstpostid = post.postid or update post left join thread on thread.firstpostid = post.postid set thread.title = post.title where thread.threadprefix !='' and thread.firstpostid = post.postid These queries literally take 2-4 seconds/thread or 1,2 million seconds but do what is intended. My question, is there a faster way? I really don't want to close the board for 14 days... Ofcourse I can simply not run the query, but in that case the threads are not findable when searching for the prefix as a keyword (even after reindexing posts). The alternative, is there a way to reindex thread titles? Thanks for any help! Greets, syba |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|