Hi,
I'm having a problem with this query. The tables in questions, all together, have about 40k registers, and the query is taking a lot to load (Even on a dual xeon 3.0).
So, is there anything I could do to make it faster? Maybe index tables would help too (what fields in that case).
SELECT users.login, users.nickname, users.city, users.uf, fotos.ext, fotos.userID, max(fotos.fotoID), fotos.ext, users.userID FROM fotos, flogs, users WHERE fotos.userID = flogs.userID && fotos.userID = users.userID GROUP BY fotos.userID ORDER BY 7 DESC LIMIT 0,9
thank you very much