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

view_log() performs unneeded count query over all log entries.

    XMLWordPrintable

Details

    Description

      The front page of the MCP calls view_log() in order to fetch the last 5 moderator actions. The final action of view_log() is to perform a COUNT() operation over all of the moderator log entries since the beginning of time. This query is very slow because it has to touch so many rows. On my server it takes 1.5 seconds to count >300,000 moderator log entries and forms a large portion of the time needed to open the MCP front page.

      That total count of moderator log entries is simply thrown away by the MCP - it doesn't use it and doesn't require it. I suggest that mcp_front.php should set $log_count to -1 before it makes the call to view_log(), and that view_log() should avoid fetching the total number of logs if $log_count is equal to -1.

      Attachments

        Issue Links

          Activity

            People

              nickvergessen Joas Schilling
              thenickdude thenickdude [X] (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: