Re: select 10000 rows from Oracle in shortest way
- From: HansF <News.Hans@xxxxxxxxx>
- Date: Mon, 23 Jan 2006 15:09:29 GMT
On Mon, 23 Jan 2006 12:17:14 +0100, Thomas Kellerer wrote:
> On 23.01.2006 11:27 dok wrote:
>> Looking for a good desicions for trasfering more than 10000 rows from
>> oracle to mysql using only jdbc. Connect is mostly slow about 1 row in
>> a second, rights on oracle are just for select, update, insert
>> operations. I think if I can devide 10000 rows in 10 parts and transfer
>> them in concurent threads and connections. Any suggestion can help me
>> to solve this problem.
>
> I can copy 10000 rows in about 40 seconds (pure JDBC).
>
> But I have noted, that insert speed is extremely slow when autocommit is
> turned on. So maybe that is your problem?
>
Manual commits in a loop with also slow things down.
Another frequent Java coding mistake is to build the SQL string manually
by concat'ing the literals into the string. A knowledgeable ORacle
Java developer will use bind (aka positional) parameters when appropriate.
Under many circumstances building a SQL stateement as a string and
executing that string dynamically is a wonderful way to kill ORacle
performance.
Another thing to look at is bulk binding & array fetching..
All these techniques are well described in the online Oracle Java
Developers and JDBC Developers manuals. Which most Java developers don't
read :-(
--
Hans Forbrich
Canada-wide Oracle training and consulting
mailto: Fuzzy.GreyBeard_at_gmail.com
*** Top posting [replies] guarantees I won't respond. ***
.
- References:
- select 10000 rows from Oracle in shortest way
- From: dok
- Re: select 10000 rows from Oracle in shortest way
- From: Thomas Kellerer
- select 10000 rows from Oracle in shortest way
- Prev by Date: Re: select 10000 rows from Oracle in shortest way
- Next by Date: after Oracle restart
- Previous by thread: Re: select 10000 rows from Oracle in shortest way
- Next by thread: Re: select 10000 rows from Oracle in shortest way
- Index(es):
Relevant Pages
|
|