Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-45694

File picker: Recent files SQL query

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.7
    • Repositories
    • None
    • MOODLE_27_STABLE

      On a big mdl_files table (802530 records), get_recent_files() function utilizes an SQL query that works extremely slow under PostgreSQL, eating up a huge amount of CPU resources and RAM. If the same query is split into several queries which use a TEMP table instead of nested SELECT, it works perfect. I can demonstrate a patch if needed, but I think you guys get the idea.

      The issue occurs with Moodle 2.3.2, but the query is exactly the same in the latest version I see on Github. Is there a reason it can't be made working with a TEMP table instead?

            Unassigned Unassigned
            sergeyandro Sergey Vidusov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.