Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: need code for Bulk inserts

Re: need code for Bulk inserts

From: nirav <shivam71_at_gmail.com>
Date: 1 Mar 2006 07:17:25 -0800
Message-ID: <1141226245.119454.206300@u72g2000cwu.googlegroups.com>


Can you post the table structures and code of getparent. One suggestion is to see if you can bulk these operations (with limit of may be 500 etc..and check session_pga usage).

Michel Cadot wrote:

> <paulhux174_at_hotmail.com> a écrit dans le message de news: 1141191254.626846.187830_at_z34g2000cwc.googlegroups.com...

> | Hi,
> | This code is far too slow. Can some show me some code to speed it up.
> | Many thanks.
> |
> | -- PL SQL CODE
> | --------------------------------------------------------------------------------
> | OPEN val_cur;
> | -- about 100,000 records
> | LOOP
> | FETCH val_cur
> | INTO c1rec;
> |
> | EXIT WHEN val_cur%NOTFOUND ;
> | parent_parent_zuidbook := getparent (p_uid =>
> | c1rec.uidvalue); -- function call gets an ID number.
> |
> | IF parent_zuidchh IS NOT NULL
> | THEN
> | UPDATE zbook a
> | SET a.zuidparent = c1rec.zuidbook
> | WHERE a.zuidbook = parent_zuidbook;
> | UPDATE zbook a
> | SET a.ztype = 'U'
> | WHERE a.zuidbook = c1rec.zuidbook;
> | ELSE
> | UPDATE zbook a
> | SET a.ztype = 'I'
> | WHERE a.zuidbook = c1rec.zuidbook;
> | END IF;
> | END LOOP;
> | CLOSE val_cur;
> |
> | --------------------------------------------------------------------------------
> |
>
> What is your Oracle version?
> What is getparent code?
> 
> Regards
> Michel Cadot
Received on Wed Mar 01 2006 - 09:17:25 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US