MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Øystein Grøvlen Date:September 28 2009 1:21pm
Subject:Re: bzr commit into mysql-5.4 branch (epotemkin:2864) Bug#34384
View as plain text  
Evgeny Potemkin wrote:
 > Hi,
 > The bug#34384 is about UPDATE being too slow.
 > See:
 > create table t(a int primary key, ...);
 > insert ...
 > update ... where a='9999999999999999';
 > As you can see, a is an INT, and the constant is a STRING.
 > To correctly compare them we convert both to DOUBLE.
 > Obviously, in this case the index over "a" can't be used.
 > Currently left & right parts of comparison are converted immediately
 > before comparison is done. This is done for each row. It's ok for a
 > field, but the converted constant can be cached. This patch implements
 > caching of constants.
 > This allows to speedup a bit comparison on large record sets, but isn't
 > noticeable on small ones.


In my opinion, performance fixes needs to be justified by some
quantitative measures. I do not think we should make the code more
complex unless it can be shown that it gives significant performance

In this particular case, even if there is a significant performance
improvements in itself, it will be insignificant compared to what the
user could achieved by casting the string to an int.

Anyhow, I will leave it to Sergei to decide whether this is a desired
change or not, and get back to you with my specific comments on the

 > The bug shown by Sergey is about wrongly used index for the SELECT
 > i.e. a different one, and will be addressed in a different bug report.

OK, Good.

bzr commit into mysql-5.4 branch (epotemkin:2864) Bug#34384Evgeny Potemkin19 Sep
  • Re: bzr commit into mysql-5.4 branch (epotemkin:2864) Bug#34384Øystein Grøvlen25 Sep
    • Re: bzr commit into mysql-5.4 branch (epotemkin:2864) Bug#34384Evgeny Potemkin25 Sep
      • Re: bzr commit into mysql-5.4 branch (epotemkin:2864) Bug#34384Øystein Grøvlen28 Sep
        • Re: bzr commit into mysql-5.4 branch (epotemkin:2864) Bug#34384Sergei Golubchik28 Sep
        • Re: bzr commit into mysql-5.4 branch (epotemkin:2864) Bug#34384Evgeny Potemkin29 Sep
  • Re: bzr commit into mysql-5.4 branch (epotemkin:2864) Bug#34384Øystein Grøvlen4 Oct