DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: which is faster - create table select or insert table select

  1. #1
    Join Date
    May 2006
    Posts
    4

    which is faster - create table select or insert table select

    There is a table -table1- with around 25M records. Oracle 8i database. I have a process to select from this table for a given criteria-which is run every month. That might return a maximum of 1M rows.
    Option
    1. I use a [create table temp_table as select ... from table1 where criteria]. since it wont be writing any rollback information Ithink this will be faster.

    2. I preacreate this temporary table called temp_table. Then do a [insert into temp_table as select ... from table1 where criteria] in the regular process.

    which will be faster

  2. #2
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    why don't you give it a whirl and let us know.
    Jeff Hunter

  3. #3
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    if you use an insert into a nologging table with an append hint then the speed will be comparable with creating a nologging table -- but as Jeff says, testing would be an entirely appropriate activity.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width