MySQL Forums
Forum List  »  Performance

Re: Slow queries with large table
Posted by: Rick James
Date: December 05, 2013 12:05PM

ALTER TABLE UsuarioWeb ADD INDEX(idEmpressa, idUsuario);
The alter will be very fast, and may help. After doing that, run the EXPLAIN again; it may have changed.

> Partition tables... Many friends told me that THIS is the solution

Maybe. First, let's see what the two indexes will do for the query.
In particular, INDEX(id_GPS, fh_prod) will do as much good, or more, than PARTITIONing.

Are there other queries that need performance help? It is best to work on all the queries at the same time.

Options: ReplyQuote


Subject
Views
Written By
Posted
5279
December 02, 2013 08:09AM
1876
December 03, 2013 09:29PM
1512
December 04, 2013 05:22AM
Re: Slow queries with large table
1379
December 05, 2013 12:05PM
1305
December 05, 2013 02:17PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.