title: Are there any alternative to cursor in Oracle for performance improvements?
body: <p>I have the below query which truncates specific tables in a specific schema. Is there a better option to do this without cursor? This query takes a a few minutes to execute as the schema is big. </p>
  
  <pre><code>DECLARE TYPE cur_typ IS REF CURSOR;
  c           cur_typ;
  qry_str   VARCHAR2(1000);
  table_name    VARCHAR2(50);    
  BEGIN
  qry_str := \'SELECT TABLE_NAME FROM USER_ALL_TABLES
      WHERE (TABLE_NAME like \'\'STG_%\'\'
        OR TABLE_NAME like \'\'S_%\'\' )\';
  
  OPEN c FOR qry_str;
  LOOP
      FETCH c INTO table_name;
      EXIT WHEN c%NOTFOUND;
      EXECUTE IMMEDIATE \'TRUNCATE TABLE \' || table_name; 
  END LOOP;
  CLOSE c;
  </code></pre>
  
  <p>Do any of you have any faster alternative?
  Thanks for the help.</p>