1. 07 Dec, 2022 5 commits
  2. 06 Dec, 2022 1 commit
  3. 05 Dec, 2022 4 commits
  4. 03 Dec, 2022 1 commit
    • Sergei Petrunia's avatar
      MDEV-29129: Performance regression starting in 10.6: select order by limit ... · e0dbec1c
      Sergei Petrunia authored
      The cause of regression was handling for ROWNUM() function.
      For queries like
      
        SELECT ROWNUM() FROM ... ORDER BY ...
      
      ROWNUM() should be computed before the ORDER BY.
      The computation was moved to be before the ORDER BY for any entries in
      the select list that had RAND_TABLE_BIT set.
      
      This had a negative impact on queries in form:
      
        SELECT sp_func() FROM t1 ORDER BY ... LIMIT n
      
      where sp_func() is NOT declared as DETERMINISTIC (and so has
      RAND_TABLE_BIT set).
      
      The fix is to require evaluation for sorting only for the ROWNUM()
      function. Functions that just have RAND_TABLE_BIT() can be computed
      after ORDER BY ... LIMIT is applied.
      
      (think about a possible index that satisfies the ORDER BY clause. In
      that case, the the rows would be read in the needed order and we would
      stop after reading LIMIT rows, achieving the same effect).
      e0dbec1c
  5. 02 Dec, 2022 2 commits
  6. 01 Dec, 2022 1 commit
  7. 30 Nov, 2022 14 commits
  8. 29 Nov, 2022 8 commits
  9. 28 Nov, 2022 4 commits