Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-9658

Optimize topic splitting

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.0.8-RC1
    • 3.0.7-PL1
    • None
    • Apache/2.2.15, PHP/5.3.2, MySQL 5.1.45, Iceweasel 3.0.6

      Splitting topics requires move_posts. Move_posts calls update_post_info before it exits from function_admin.php.

      Update_post_info has a query which takes very-very long time to be executed (sometimes more than 30secs). This is it:

      // Now, let us collect the user/topic combos for rebuilding the information
      $sql = 'SELECT poster_id, topic_id
      FROM ' . POSTS_TABLE . '
      WHERE ' . $db->sql_in_set('topic_id', $topic_ids) . '
      AND poster_id <> ' . ANONYMOUS . '
      GROUP BY poster_id, topic_id';
      $result = $db->sql_query($sql);

      Is there a way to optimize it somehow?

      Cheers,
      aig

            rxu rxu
            aig aig
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: