This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Calling JDBC or Stored Procedures(in Oracle), which is faster Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Calling JDBC or Stored Procedures(in Oracle), which is faster" Watch "Calling JDBC or Stored Procedures(in Oracle), which is faster" New topic
Author

Calling JDBC or Stored Procedures(in Oracle), which is faster

Bhasker Reddy
Ranch Hand

Joined: Jun 13, 2000
Posts: 176
I need to insert multiple records(in tens of thousands)from a pipe delimited text file to oracle stored procedures. Is using JDBC faster for this purpose or calling oracle stored procedures is faster. I am using Oracle Stored Procedures and i think it is extremely slow.
Please suggest


Bhasker Reddy
Reid M. Pinchback
Ranch Hand

Joined: Jan 25, 2002
Posts: 775
Not entirely sure what you are asking, it kinda sounded like:

I am required to feed this data to a stored procedure, so which is going to be faster? Stored procedure (the requirement), or JDBC (not the requirement)?

Did you mean to say that you want to load the data into tables, and you don't know which of the two choices to use? Or did you mean that you are trying to decide between a PL/SQL stored procedure or a Java stored procedure?
FYI, if you are only trying to load tables, want to do it fast, and the data file(s) will be on the same machine as you are running the database instance on, try Oracle's sqlldr utility. It has something called a 'direct path load' feature, which is your fastest way to do bulk data loads. Triggers don't get fired, so it really only works for bulk loads of data.
[ February 03, 2003: Message edited by: Reid M. Pinchback ]

Reid - SCJP2 (April 2002)
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

"Reddy",
You have 150 posts and an invalid display name.
Your display name must be your first name, a space, then your last name.
We're light on rules here, but we actively enforce this one. Change your display name immediately or your account will be deleted.
I'm assuming you had a valid name and have changed it to something invalid, which is why I didn't delete your account immediately. I'd change it back quickly though.
thanks
Dave
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

You might also find this thread helpful.
Dave
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Calling JDBC or Stored Procedures(in Oracle), which is faster
 
Similar Threads
Cannot get Oracle CURSOR from Oracle procedure
Oracle ODBC Driver Problems. Please help
JSP and Oracle Functions
Why PL/SQL when you could use Java?
Size Data Unit Mismatch, Invalid Packet Length