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

admin log generate slow queries

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Fixed
    • 3.0.x
    • 3.1.11-RC1
    • ACP
    • 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

            Marc Marc
            Paul Paul Sohier
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: