View Full Version : Organzing BLOBs for SQL*Loader
mattinVS
09-20-2005, 12:24 AM
Hi,
have to load a mass of data (some million records) on a regular basis
into Oracle 10g release 2. While I am sure that sqlldr can achieve the
needed performance for the "text" part of the data I am unsure about
how to optimally organize the binary data (pictures) that is
associated.
Currently I am using the control file option
ext_fname FILLER CHAR(40),
"DATA" LOBFILE(ext_fname) TERMINATED BY EOF
What I would prefer (because it would avoid opening millions of small
picture files and also reducing the amount of used disk space for the
import data) is having all pictures within the text data files or at
least having multiple pictures (with preceding byte length) in one
file.
Can sqlldr be used like that? Or is there an even better way?
Best regards from sunny (but cold) Black Forrest,
Mattin
DA Morgan
09-23-2005, 03:35 PM
mattinVS wrote: Hi, have to load a mass of data (some million records) on a regular basis into Oracle 10g release 2. While I am sure that sqlldr can achieve the needed performance for the "text" part of the data I am unsure about how to optimally organize the binary data (pictures) that is associated. Currently I am using the control file option ext_fname FILLER CHAR(40), "DATA" LOBFILE(ext_fname) TERMINATED BY EOF What I would prefer (because it would avoid opening millions of small picture files and also reducing the amount of used disk space for the import data) is having all pictures within the text data files or at least having multiple pictures (with preceding byte length) in one file. Can sqlldr be used like that? Or is there an even better way? Best regards from sunny (but cold) Black Forrest, Mattin
I would take a look at the procedures in the DBMS_LOB package.
Morgan's Library at www.psoug.org
click on DBMS_LOB
scroll down to "Blob Load Demo"
It may help.
--
Daniel A. Morgan
http://www.psoug.org
damorgan@x.washington.edu
(replace x with u to respond)
mattinVS
10-13-2005, 02:01 AM
Hi,
thanks. I had a look at the URL, but it did not help me. I need to load all data at once, not first the text data and then, in a PL/SQL routine, the related BLOB data. Further on I doubt that the problem of reading so many files will be solved by the DBMS_BLOB package.
Example for my problem:
If only loading 22000 small pictures, the difference between having the pics in one file, terminated by "<end>\n"...
[control file looks like:
ext_fname FILLER CHAR(40),
data LOBFILE(CONSTANT '00999/img.lob') TERMINATED BY "<end>\n"
]
... and between loading them form separate files ...
[control file looks like:
ext_fname FILLER CHAR(40),
data LOBFILE(ext_fname) TERMINATED BY EOF
]
is more than 40 seconds (which is roughly 20 percent faster!).
My problem really is I/O.
Best regards from sunny Black Forrest, Germany,
Mattin
MyLounge.com Site Map
Forum:
Cars,
Cell Phone,
Database,
Games,
Home Improvement,
IT,
Music,
School,
Sports,
Web Design,
Web Server,
Weight Loss
The MyLounge.com forum is intended for informational use only and should not
be relied upon and is not a substitute for any advice. The information contained
on MyLounge.com are opinions and suggestions of members and is not a representation
of the opinions of MyLounge.com. MyLounge.com does not warrant or vouch for
the accuracy, completeness or usefulness of any postings or the qualifications
of any person responding. Please consult a expert or seek the services of an
attorney in your area for more accuracy on your specific situation. Please note
that our forums also serve as mirrors to Usenet newsgroups. Many posts you see
on our forums are made by newsgroup users who may not be members of MyLounge.com
Term of Service
vBulletin v3.0.7, Copyright ©2000-2009, Jelsoft Enterprises Ltd.