ifuyivara
10-05-2016, 06:17 PM
I recently upgraded to vbulletin 5 from vbulletin 3.8
Our forum has literally millions of threads/posts. And now every time we try to moderate a thread (say, move it to a different channel/forum) it times out. I identified the problem being in the closure table (it has about 54 million rows) and the following query takes forever:
DELETE cl3 FROM closure AS cl
INNER JOIN closure AS cl2 ON cl2.parent = cl.child AND cl2.depth > 0
INNER JOIN closure AS cl3 ON cl3.child = cl2.child AND cl3.parent = cl.parent
WHERE cl.child IN (873064) AND cl.depth > 0
Any suggestions on how to go about fixing this problem? Thank you!
Our forum has literally millions of threads/posts. And now every time we try to moderate a thread (say, move it to a different channel/forum) it times out. I identified the problem being in the closure table (it has about 54 million rows) and the following query takes forever:
DELETE cl3 FROM closure AS cl
INNER JOIN closure AS cl2 ON cl2.parent = cl.child AND cl2.depth > 0
INNER JOIN closure AS cl3 ON cl3.child = cl2.child AND cl3.parent = cl.parent
WHERE cl.child IN (873064) AND cl.depth > 0
Any suggestions on how to go about fixing this problem? Thank you!