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

Thread: Parallel insert and query to use 2 CPU

  1. #1
    Join Date
    Sep 2003
    Location
    China
    Posts
    72

    Parallel insert and query to use 2 CPU

    Hi,

    insert into tab1 values (id, name); <- running in a loop
    select * from tab1 order by id;

    How can I translate the 2 SQL into using parallel execution which will use 2 CPU of the server? Tks.

  2. #2
    Join Date
    Oct 2002
    Posts
    807
    use parallel hint

  3. #3
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    That form of insert won't parallelize ... you can't split a one-row operation across multiple processes.
    David Aldridge,
    "The Oracle Sponge"

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

    Oracle ACE

  4. #4
    Join Date
    Sep 2003
    Location
    China
    Posts
    72
    Originally posted by slimdave
    That form of insert won't parallelize ... you can't split a one-row operation across multiple processes.
    The insert is running in a looping for 1 million times so its possible right?

  5. #5
    Join Date
    Dec 2002
    Location
    Bangalore ( India )
    Posts
    2,434
    Originally posted by CaoCao
    The insert is running in a looping for 1 million times so its possible right?
    That form of insert won't parallelize ... you can't split a one-row operation across multiple processes.
    funky...

    "I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."

    "Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"

  6. #6
    Join Date
    Sep 2003
    Location
    China
    Posts
    72
    Originally posted by abhaysk
    Ok if I perform a single update statement which will update 1m rows, then it will parallelize?

  7. #7
    Join Date
    Oct 2002
    Posts
    807
    Yup. See http://download-west.oracle.com/docs...ngpe.htm#64628 for restrictions on parallel dml.

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