Welcome Guest ( Log In | Register )


 
 
 
 
 
 

 
 
Oracle 

performance Tuning 10g reference poster
 
Oracle training in Linux 

commands
 
Oracle training 

Excel
 
Easy Oracle Jumpstart
 
Oracle training & performance tuning books
 
Burleson Consulting Remote DB Administration
 
 
 
Reply to this topicStart new topic
> Export/Import BLOBS ... is there a better way to handle?
angus
post May 1 2012, 07:38 AM
Post #1


Newbie
*

Group: Members
Posts: 7
Joined: 26-May 11
Member No.: 45,244



Hi folks,

The company I'm contracted to is making use of Amazon Web Services, in particular, we are using Amazon RDS with version Oracle 11gR2 Standard Edition. Unfortunately, Amazon does not support data pump but export/import is available.

We don't have a lot of tables (<50) in our database at present but a couple have over 4 millions rows. Also, some contain blobs.

In my export, I've made use of such parameters as ...

DIRECT=Y
RECORDLENGTH=65535

which has optimized the export of the "non-blob" tables somewhat. The tables housing blobs, of course, resort to the conventional path. As I understand it, BLOBS are processed one row at a time. So these tables are taking quite a bit of time to export.

my question: is there a way to handle the export/import of blobs which would be much more efficient?

Are there any other recommendations, overall, that could make an export/import work better?

Thanks in advance.
Go to the top of the page
 
+Quote Post
burleson
post May 1 2012, 04:42 PM
Post #2


Advanced Member
***

Group: Members
Posts: 10,359
Joined: 26-January 04
Member No.: 13



Hi Angus,

>> making use of Amazon Web Services

You have my condolances.

I would complain STRONGLY for being forced to use a deprecated utility.

****************************************
>> is there a way to handle the export/import of blobs which would be much more efficient?

Check out my notes in improving import performance:

http://www.dba-oracle.com/oracle_tips_load_speed.htm

You can export BLOBS with Java and utl_file but AWS may not allow it:

http://www.dba-oracle.com/t_export_unload_blob_clob.htm

http://www.dba-oracle.com/t_java_graphics_blob_retrieval.htm

http://www.oracle-base.com/articles/9i/export-blob-9i.php

Check out this book, it has advanced techniques for import/export:

http://www.rampant-books.com/book_0801_oracle_utilities.htm


--------------------
Hope this helps. . .

Donald K. Burleson
Oracle Press author
Author of Oracle Tuning: The Definitive Reference
Go to the top of the page
 
+Quote Post
angus
post May 2 2012, 06:45 AM
Post #3


Newbie
*

Group: Members
Posts: 7
Joined: 26-May 11
Member No.: 45,244



Thanks Donald, for your notes and condolences. :-)
Go to the top of the page
 
+Quote Post
brandedfundoo
post May 8 2012, 11:36 AM
Post #4


Member
**

Group: Members
Posts: 29
Joined: 4-July 09
Member No.: 41,144



QUOTE (angus @ May 2 2012, 06:45 AM) *
Thanks Donald, for your notes and condolences. :-)



smile.gif and for forced publicity too !!!
Go to the top of the page
 
+Quote Post
Bambi Wang
post Aug 31 2012, 03:30 PM
Post #5


Newbie
*

Group: Members
Posts: 1
Joined: 31-August 12
From: Boston
Member No.: 47,579



If you can use JAVA and JDBC, you can use getBytes and setBytes to copy BLOBs from one database to another database. Here is a sample.

Blob blob;
byte[] streamData;

blob = rs.getBlob(i + 1);
streamData = blob.getBytes(1, (int) blob.length());
insertStatement.setBytes(i + 1, streamData);

It is at least 5 times faster than data pump or export/import.

My team have developed a tool using above code and multi-threading, batch processing, etc. It is over 30 times faster than data pump for copying BLOB or CLOB. If anyone is interested, feel free to contact me for details.
Go to the top of the page
 
+Quote Post
kdinesh
post Nov 3 2012, 04:21 AM
Post #6


Newbie
*

Group: Members
Posts: 1
Joined: 3-November 12
Member No.: 47,867



QUOTE (Bambi Wang @ Aug 31 2012, 04:30 PM) *
If you can use JAVA and JDBC, you can use getBytes and setBytes to copy BLOBs from one database to another database. Here is a sample.

Blob blob;
byte[] streamData;

blob = rs.getBlob(i + 1);
streamData = blob.getBytes(1, (int) blob.length());
insertStatement.setBytes(i + 1, streamData);

It is at least 5 times faster than data pump or export/import.

My team have developed a tool using above code and multi-threading, batch processing, etc. It is over 30 times faster than data pump for copying BLOB or CLOB. If anyone is interested, feel free to contact me for details.


Interested in knowing how you made it 30 times faster as i am also trying the same thing. my db server is on the network and the bandwidth is blocking the throughput.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 18th May 2013 - 03:56 PM