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

Improve get_conversions_for_file query performance on large sites

    XMLWordPrintable

Details

    Description

      There's a seq scan that's occurring in the query produced by `get_conversions_for_file` (files/classes/conversion.php)

      For some reason, Postgres is choosing to do that rather than use one of the indexes. This query is regularly sitting in the top 4 for CPU on both the various reader and writer instances we're using.

      Also I've tested this on a smaller site and the issue wasn't apparent. I've only observed this on larger sites.

      Attachments

        Issue Links

          Activity

            People

              kevinpham Kevin Pham
              kevinpham Kevin Pham
              Brendan Heywood Brendan Heywood
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              CiBoT CiBoT
              Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo, Matteo Scaramuccia, David Woloszyn, Huong Nguyen, Jake Dallimore, Meirza, Michael Hawkins, Raquel Ortega, Safat Shahin, Stevani Andolo
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                28/Nov/22

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 30 minutes
                  30m