From: Jorge Bastos Date: November 6 2009 4:06pm Subject: RE: Help on query performance List-Archive: http://lists.mysql.com/win32/19050 Message-Id: <000601ca5efb$23ffa840$6bfef8c0$@jorge@decimal.pt> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi Mos, > Jorge, > In addition to the other poster's recommendation on making a > non-unique compound index, if this is a read-only table then you can > get > faster performance by copying it to a memory table using: > > create table mem_mov_stock engine=memory select * from mov_stock; > alter table mem_mov_stock add index ix_Main( cod_art,arm_cod,emp,ano); > > This will get the speeds down quite a bit. Hum... that's interesting. I'll give it a try also. The query is for read only, on the routine I need, it is only reading, inserting records is on other part and that doesn't have any performance problem. Jorge,