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

Home -> Community -> Usenet -> c.d.o.misc -> Re: inserting many records with ADO is very slow

Re: inserting many records with ADO is very slow

From: Stefan Felkel <stefan.felkel_at_cim-team.de>
Date: 15 Sep 2004 23:57:52 -0700
Message-ID: <d705870.0409152257.4bc1776f@posting.google.com>


wario_spam_at_insightbb.com (wario) wrote in message news:<962c6d85.0409151034.746db556_at_posting.google.com>...
> Your example would not be the optimal method to perform bulk
> update/insert into a database.
>
> 1. Create a pl/sql block to perform changes.
>
> begin
> execute immediate 'DROP TABLE SCOTT.TEST';
> execute immediate 'CREATE TABLE SCOTT.TEST (NAME
> VARCHAR2(750))';
>
> insert into scott.test (name)
> select name from table_a;
>
> commit;
> end;
>
>
> 2. Better yet. Use SQL Loader to insert all your data into a table
> used for transactions. Then use MERGE, INSERT or UPDATE to
> update/insert changes to main table.

The script is only for testing purposes. The real application generates these records at runtime, so there's no source table i can copy the records from. Tonight i tested it with client side cursors an that seems to solve my problems:

  1000 records 2 s

  2000 records:    3 s
  4000 records:    7 s
  8000 records:   15 s
 16000 records:   31 s
 32000 records:   62 s (server side: 326 s)
 64000 records:  128 s (server side: 2268 s)
128000 records:  249 s (server side: 17533 s)
256000 records:  676 s
Received on Thu Sep 16 2004 - 01:57:52 CDT

Original text of this message

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