I try to optimize my query because order by cause trouble,for more understanding, i try to achieve this good solution : Slow query when using ORDER BY
I have 70K in my table , when i go for this i have this eeror : #1248 - Every derived table must have its own alias
my original query looks like this :
SELECT * FROM
( SELECT * FROM profile
LEFT JOIN profileg USING( id )
WHERE X NOT IN ( SELECT A FROM B ) AND ( S = 1 )
DESC LIMIT 0, 20
) ORDER BY M
can you give some help please ?!? regards, jessica