title: Mysql Query taking time
body: <p>Qe : 1) </p>
  
  <pre><code>select 
    a.finishproductid 
  from 
    tblt_invoiceorderitems a, tblm_invoiceorder b 
  where 
    b.invoiceorderdate &lt;= 'Current Date' and 
    a.invoiceorderid = b.invoiceorderid 
  </code></pre>
  
  <p>--- it has more than 16k records.</p>
  
  <p>Qe : 2 )</p>
  
  <pre><code>select jobcardid, stockcode 
  from tblm_finishproduct 
  where productionentrydate &lt;= 'Current Date'
  </code></pre>
  
  <p>--- it has also more than 16k Record.</p>
  
  <p>Now i Want From 2nd Query not in  first query.</p>
  
  <pre><code>select jobcardid, stockcode 
  from 
    tblm_finishproduct 
  where 
    productionentrydate &lt;= 'CurrrntDate' and 
    finishproductid not in 
    (
      select 
        a.finishproductid 
      from 
        tblt_invoiceorderitems a, tblm_invoiceorder b 
      where 
        b.invoiceorderdate &lt;= 'CurrrntDate' and 
        a.invoiceorderid = b.invoiceorderid
    );
  </code></pre>
  
  <p>Now its taking a time</p>