title: copy 25 million records from one table to another table in oracle
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/143872/what-is-the-fastest-way-to-insert-data-into-an-oracle-table">What is the fastest way to insert data into an Oracle table?</a>  </p>
  </blockquote>
  
  
  
  <p>Table has 25 million records. I need to add new column datatype is date in this table and copy data into this new column from old column under same table but old column has timestamp datatype. I am doing following steps, Can you please let me know any other way i can do it. When i run follwing queries it running 6 or 7 hours and then i have to kill it.  Database is oracle. </p>
  
  <pre><code>alter table  ofr_ft rename to  ofr_ft_bkup;
  
  CREATE TABLE ofr_ft ( 
  all old columns,
          age      DATE NOT NULL,
  CONSTRAINT ofr_ft_pk
  PRIMARY KEY (ofr_ft_id)
  );
  
  INSERT INTO ofr_ft
              (old coumns,
               age)
     (values from old columns,
             cast(date_last_chng as date)
        FROM ofr_ft_bkup);
  
  COMMIT;
  </code></pre>