Q
Problem solve Get help with specific problems with your technologies, process and projects.

Faster way to parse codes into table

I am working on a large text file. Each row has codes and values that I must parse into a table using DMBS_LOB.INSTR and DBMS_LOB.SUBSTR. I found those methods really slow. Is there a faster way?

I am working on a large text file (over 500KB and more than 8,000 rows). Each row has codes and values that I must parse into a table using DMBS_LOB.INSTR and DBMS_LOB.SUBSTR. I found those methods are really, really slow. Is there any alternative method I could use to make it faster? Thanks in advance.
Have you thought about using External Tables? The Oracle Utilities Guide shows how to use External Tables. External Tables lets you access data in a text file as if it were in a table within the database. This makes it nice to perform complex SELECT queries against the data. So your SELECT statement written against the External Table can have the DBMS_LOB packages INSTR and SUBSTR functions. To insert the data into a normal table, simply perform an INSERT SELECT:
INSERT INTO my_table
SELECT dbms_lob.INSTR(....) FROM external_table;
External Tables might just be what you need.

Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close