1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 I have 460,000 threads to move to a different forum. Can I do an SQL statement?

Discussion in 'XenForo Questions and Support' started by Stuart Wright, Jul 28, 2015.

  1. Stuart Wright

    Stuart Wright Well-Known Member

    Hi folks,
    we've got slow queries running because our classifieds archive forum has 540,000 threads.
    So I want to move the older ones out to a non-public forum.
    At the rate it's taking the system, it will take days.
    Can I just run a query to change the node id of the threads?
  2. batpool52!

    batpool52! Well-Known Member

    Batch Update Threads?
  3. Stuart Wright

    Stuart Wright Well-Known Member

  4. Xon

    Xon Well-Known Member

    @Stuart Wright You will need to re-index all the threads after updating the xf_thread table.
  5. a.ali

    a.ali Member

  6. Stuart Wright

    Stuart Wright Well-Known Member

    No, just older threads from one forum to another within the same category.
    It makes much more sense to UPDATE xf_thread SET node_id = 123 WHERE node_id = 456 and post_date < 'a year ago'.
    So long as everything is good after doing a thread reindex, I think that's the best way to go.
    a.ali and Rob like this.
  7. Stuart Wright

    Stuart Wright Well-Known Member

    The SQL took I think less than a minute and the thread reindex just a small number of hours.
    The whole process considerably quicker than the batch update

Share This Page