Re: Slow queries / inserts InnoDB

2012-10-09 Thread Andrés Tello
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

RE: Slow queries / inserts InnoDB

2012-10-09 Thread Rick James
(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

Re: Slow queries / inserts InnoDB

2012-10-09 Thread Cheng Xianming
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

Slow queries / inserts InnoDB

2012-10-08 Thread Adrián Espinosa Moreno
Hi. I have developed my first application with VB.NET at work (junior developer) and basically it reads several thousands of lines from X number of files, and inserts them into a mysql database. The application consists of several steps: 1) Dump all lines with all fields into a temp