title: How to reduce query execution time for table with huge data
body: <p>I am running this query in production(Oracle) and it is taking more than 3 minutes .  Is there any way out to reduce the execution time ? Both svc_order and event table contains almost 1million records .</p>
  
  <pre><code>select 0 test_section, count(1) count, 'DD' test_section_value  
  from svc_order so, event e  
  where so.svc_order_id = e.svc_order_id  
    and so.entered_date &gt;= to_date('01/01/2012', 'MM/DD/YYYY')  
    and e.event_type = 230 and e.event_level = 'O'  
    and e.current_sched_date between 
        to_date( '09/01/2010 00:00:00', 'MM/DD/YYYY HH24:MI:SS')
        and to_date('09/29/2013 23:59:59', 'MM/DD/YYYY HH24:MI:SS')  
    and (((so.sots_ta = 'N') and (so.action_type = 0)) 
         or  ((so.sots_ta is null) and (so.action_type = 0)) 
         or  ((so.sots_ta = 'N') and (so.action_type is null)))
    and so.company_code = 'LL'
  </code></pre>