Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-8301

admin log generate slow queries

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.x
    • Fix Version/s: 3.1.11-RC1
    • Component/s: ACP
    • Labels:
    • Environment:
      PHP Environment:
      Database: MySQL(i) 5.1.32

      Description

      When there are 300k of rows (Where from 200k are for the admin log) in the DB the query within the ACP will become slow.
      When looking at the explain there is a filesort done with the query.
      It also doesn't use a key by default.
      Looking at the DB this is caused by that there is no index at log_time, while this is used by default as ORDER BY in the query.

      Query that is affected:

      SELECT l.*, u.username, u.username_clean, u.user_colour
      FROM phpbb_log l, phpbb_users u
      WHERE l.log_type = 0
      AND u.user_id = l.user_id
      ORDER BY l.log_time DESC
      LIMIT 5

        Attachments

          Activity

            People

            • Assignee:
              Marc Marc
              Reporter:
              Paul Paul
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: