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

Faster user sync in auth/db

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Do
    • 2.0, 2.3.2, 2.4, 2.8
    • None
    • Authentication
    • Any
    • MOODLE_20_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE, MOODLE_28_STABLE
    • MDL-25373-master
    • Hide
      • You must have an external database with users
      • Enable auth/db
      • Configure the plugin to match you external database configs
      • Configure some profile fields to sync
        • Run the syncronization via cron
          • See that all users are imported much faster
      • Alter some details of your users in external database
        • Run the syncronization via cron
          • See that users you have altered are updated much faster

      You may have a somewhat big database, with at least 10K+ users to sync, to really see the difference in speed.

      Show
      You must have an external database with users Enable auth/db Configure the plugin to match you external database configs Configure some profile fields to sync Run the syncronization via cron See that all users are imported much faster Alter some details of your users in external database Run the syncronization via cron See that users you have altered are updated much faster You may have a somewhat big database, with at least 10K+ users to sync, to really see the difference in speed.

    Description

      This patch does two things for auth/db:

      • Faster user sync
        • Use temporary tables to store all users with all fields
        • Select which users to update/insert/revive using (left) joins
        • Update user info using only one UPDATE statemente (instead of 1 udpate for each field for each user)

      Attachments

        Issue Links

          Activity

            People

              danielneis Daniel Neis Araujo
              danielneis Daniel Neis Araujo
              Frédéric Massart Frédéric Massart
              Votes:
              6 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: