You are forcing mysql to do full table scans with the substr...
Use explain to see that you aren't using any index.
Avoid the use of substr in the where clause, by splitting your data, index
that field and do you query over that field.
That is why your query is so slow.
the slow insert, is
(with substitutions filled in)
-Original Message-
From: Andrés Tello [mailto:mr.crip...@gmail.com]
Sent: Tuesday, October 09, 2012 7:04 AM
To: Adrián Espinosa Moreno
Cc: mysql@lists.mysql.com
Subject: Re: Slow queries / inserts InnoDB
You are forcing mysql to do full table scans with the substr
Tello is right ! Moreno, and I sugest that: if you want query by
SUBSTR(ISN,2) ,you should create a field named like isnInfo, and
save SUBSTR(ISN,2) to this filed when you insert . don't forget create a
index on this field .
于 12-10-9 下午10:04, Andrés Tello