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

Integers inserted in SQL queries as quoted strings confusing MySQL query optimiser

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.4.1
    • Database SQL/XMLDB
    • None
    • MOODLE_34_STABLE

      The SQL statement builder is passing numeric parameters to prepared statements as quoted strings, making the query optimizer (MySQL) to ignore the indexed numeric fields and there are hundreds of unused indices as reported by the MySQL statistics. I consider this to affect other databases as well.

      Examples include the auto-increment field id of any table, courseid, userid etc.

            Unassigned Unassigned
            amfipolis VASILEIOS SOTIRAS
            Votes:
            3 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:

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