MySQL Forums
Forum List  »  Performance

Re: 1000 select queries vs 1 ( select .. in ) query
Posted by: Peter Brawley
Date: May 04, 2021 12:37PM

Usually you'd write something like ...

elect * from topic where user_id between 1 and 1000;

... or ...

select * from topic where user_id <= 1000;

SQL parsing engines optimise for such range searches, you might want to read about range optimisation in the manual.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: 1000 select queries vs 1 ( select .. in ) query
79
May 04, 2021 12:37PM


Sorry, only registered users may post in this forum.

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.