title: Informix Query Tuning
body: <p>I have a table called lead, which have about 500 thousand records and we need the following query to get executed.</p>
  
  <pre><code>SELECT skip 300000 first 75 *  
    FROM lead 
   WHERE ((enrollment_period IS NULL) OR 
  (enrollment_period IN ('FT2015','F16','SUM2016','FALL2016','FALL2017','SP17'))) 
   ORDER BY created_on DESC
  </code></pre>
  
  <p>The table lead has id column as the primary key and thus have clustered index in that column.  This query is taking about 12 - 13 mins.  When I added a non-clustered index on created_on and enrollment_period columns, it came down to 4 - 5 mins.  Then I changed the clustered index from id column to this index, execution time came down further to about 50 seconds now.  </p>
  
  <p>Is there any other optimization scope available for this query?
  Overall, is there any other change that can be done so that the query will execute faster?</p>
  
  <p>Thanks in Advance,
  Manohar</p>