Data load in Oracle.

Tuning de Banco, Tuning de SQL, Ferramentas de tuning
Post Reply
User avatar
wbarrence
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 55
Joined: Thu, 06 Oct 2011 10:30 am
Location: SP
--
WABS

Hello everyone,

I need to make a data load on some tables in the database from a 350 MB file, the data contained in the file are inserts generated from the Oracle SQL Developer, and are more than 1 million lines.

Can anyone give me some tips on how to do this load in a safe way?

ATT,

Wanderson Barrence
Trevisolli
Moderador
Moderador
Posts: 2016
Joined: Wed, 12 Jan 2005 3:25 pm
Location: Araraquara - SP
Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Wanderson, okay?

I went through a similar situation here in the company, however, had a pre-formatted text file.
With it, I used SQL * Loader (for 50 million lines) and, which I believe to be very safe and fast.
I do not know how to tell you if he can insert a file with inserts, but it is worth giving a researched in the documentation of the same:
http://docs.oracle.com/cd/B28359_01/ser ... rt_ldr.htm
Anything, count on us.
User avatar
wbarrence
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 55
Joined: Thu, 06 Oct 2011 10:30 am
Location: SP
--
WABS

Sack,

Loader is the best option even !!!

Thanks guys !!!

ATT,

Wanderson Barrence
User avatar
fbifabio
Moderador
Moderador
Posts: 199
Joined: Tue, 22 Feb 2011 1:51 pm
Location: São Paulo - SP
Contact:
Fábio Prado
www.fabioprado.net

There is also the option to create an external table referencing your file and use parallelism with the Hint Append in the Insert to make the load. In the Guob Tech Day 2012, I saw a presentation that demonstrated that this technique was very fast than with SQL Loader.

[] S

Fábio Prado www.fabioprado.net
User avatar
wbarrence
Rank: Programador Sênior
Rank: Programador Sênior
Posts: 55
Joined: Thu, 06 Oct 2011 10:30 am
Location: SP
--
WABS

Poxa Fábio,

I also watched this lecture, but I still do not understand how to start doing !!!


Att,
User avatar
fbifabio
Moderador
Moderador
Posts: 199
Joined: Tue, 22 Feb 2011 1:51 pm
Location: São Paulo - SP
Contact:
Fábio Prado
www.fabioprado.net

WARRERENCE,

I already include an example of this process in my Tuning SQL training. It is not very difficult, the idea is to create an external table that will read the contents of the file, then use INSERT with Hint Append to read the data from the external table and press another table (internal) of the system.

I have an article that shows how to create external tables on my blog: http://www.fabioprado.net/2010/09/tabelas-externas.html
[] S
Fábio Prado www.fabioprado.net
Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 19 guests