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

admin log generate slow queries

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.1.11-RC1
    • 3.0.x
    • ACP
    • PHP Environment:
      Database: MySQL(i) 5.1.32

      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

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

              Created:
              Updated:
              Resolved: