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

Postgresql driver performance tuning

XMLWordPrintable

    • MOODLE_29_STABLE, MOODLE_31_STABLE
    • MOODLE_32_STABLE
    • Hide

      1. Successfully Install a new Moodle site on PostgreSQL
      2. Units test and behat tests pass on PostgreSQL

      Optionally:

      1. Copy userquerytest.php to your moodle root directory.
      2. Open a terminal and go to your mooodle root directory and run the following command.

        php userquerytest.php [NUMBER_OF_USERS_YOU_WANT]
        

        (the higher number, the better)

      3. Compare the results to before and after the patch.
        • Confirm that the results after the patch is at least the same or better than before the patch.
      Show
      1. Successfully Install a new Moodle site on PostgreSQL 2. Units test and behat tests pass on PostgreSQL Optionally: Copy userquerytest.php to your moodle root directory. Open a terminal and go to your mooodle root directory and run the following command. php userquerytest.php [NUMBER_OF_USERS_YOU_WANT] (the higher number, the better) Compare the results to before and after the patch. Confirm that the results after the patch is at least the same or better than before the patch.

      Sharing some changes we've made to the postgresql DB driver over the years for performance reasons.

      Most of the diff here revolves around adding the static table metadata caches back, and parsing queries for 'evil' things where we must reset to avoid stale data.

      We've also ensured redundant LIMIT/OFFSET clauses are not added to queries; this helps the planner avoid a few bad cases, especially with OFFSET 0.

      In a selection (non-sleeping) of unit tests, this patch alone cuts run time 15%.

      Similar results may occur in e.g. upgrade scripts with many calls to update_record (see MDL-48604).

            mr-russ Russell Smith (Inactive)
            tlevi Tony Levi
            Jun Pataleta Jun Pataleta
            Dan Poltawski Dan Poltawski
            Rajesh Taneja Rajesh Taneja
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

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