title: Oracle SQL Optimization: SQL Query taking very long time
body: <pre><code>SELECT DISTINCT 
      'LRS-TECH  1' || rpad(code,7) || rpad('APPTYPE',30) || 
       rpad(licensing_no,30) || rpad(' ',300) AS RECORD 
  FROM APPS
  WHERE L_code = '1000' AND licensing_no IS NOT NULL
  </code></pre>
  
  <p>This seems to be the primary culprit in why I cannot export these records to a textfile in my development environment. Is there any way I can get this query to run quicker. It returns roughly 2000+ lines of text. </p>