title: Inner query or multiple queries which would be result in better performance for mysql?
body: <p>Inner query:</p>
  
  <pre><code>select up.user_id, up.id as utility_pro_id from utility_pro as up
  join utility_pro_zip_code as upz ON upz.utility_pro_id = up.id and upz.zip_code_id=1
  where up.available_for_survey=1 and up.user_id not in (select bjr.user_id from book_job_request as bjr where 
  ((1583821800000 between bjr.start_time and bjr.end_time) and (1583825400000 between bjr.start_time and bjr.end_time)))
  </code></pre>
  
  <p>Divided in two queries:</p>
  
  <ol>
  <li><p><code>select up.user_id, up.id as utility_pro_id from utility_pro as up
  join utility_pro_zip_code as upz ON upz.utility_pro_id = up.id and upz.zip_code_id=1</code></p></li>
  <li><p><code>Select bjr.user_id as userId from book_job_request as bjr where bjr.user_id in :userIds and (:startTime between bjr.start_time and bjr.end_time) and (:endTime between bjr.start_time and bjr.end_time)</code></p></li>
  </ol>
  
  <p><em>Note</em>:
  <em>As per my understanding, when single query will be executed using inner query it will scan all the data of book_job_request but while using multiple queries rows with specified user ids will be checked.</em></p>
  
  <p>Any other better option for the same operation other than these two is also appreciated.</p>