is there a way to optimize a sql request with a lot of "AND"

Viewed 58

I just wrote this request which works:

select assets.name 
from assets,
     users 
where assets.user_id = users.id 
  and users.id = '98d7f61e-af36-48ae-b28b-c233fa78fe3a' 
  and users.account_status = 'APPROVED' 
  and assets.for_sale = TRUE

I'm asking to myself if it is possible to optimize my request with using a special structure instead these four "AND" instructions.

0 Answers
Related