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

Add some developer warning on SQL's IN() abuse

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Minor Minor
    • None
    • 2.4.3, 2.5, 2.6
    • Database SQL/XMLDB
    • MOODLE_24_STABLE, MOODLE_25_STABLE, MOODLE_26_STABLE

      While working on MDL-27071 it was clear that IN() clauses using BIG number of params don't scale properly and should be considered abuse.

      This is about to decide:

      1) if we should start showing some DEV warning when the number of elements is over, say, 500 recommending to change the code to use one of these:

      • subqueries.
      • PHP chunks.
      • temp tables.

      2) fix bulk user actions with some of the techniques above because they are abusing the IN() clause (see MDL-27071 and linked issues there).

      Ciao

            moodle.com Moodle HQ
            stronk7 Eloy Lafuente (stronk7)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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