ciao a tutti

secondo voi come potrei ottimizzare questa query :

Codice PHP:
$query "SELECT bx_spy_data.*, Profiles.ID, Profiles.Avatar

FROM bx_spy_data 

INNER JOIN Profiles ON bx_spy_data.sender_id = Profiles.ID 

WHERE ( sender_id=
$mioid OR recipient_id=$mioid 
or (sender_id IN (select friend_id from bx_spy_friends_data where sender_id=
$mioid)) or (recipient_id IN
(select friend_id from bx_spy_friends_data where sender_id=
$mioid))) 

ORDER BY bx_spy_data.id DESC LIMIT 0,30"

renderla più leggera , ho selezionato solo le tab che devo usare , ma per il resto non saprei...