Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: PLSQL versus OCI versus JDBC

Re: PLSQL versus OCI versus JDBC

From: Hans Forbrich <forbrich_at_telusplanet.net>
Date: Wed, 18 Jun 2003 16:32:24 GMT
Message-ID: <3EF0927E.A79A05D1@telusplanet.net>


I did not see any database version or operating system info. Therefore assuming Oracle9i Release 2 ....

PL/SQL can be natively compiled to C code. The non-database interactions (Select, Insert, etc.) therefore can run at C speeds. Database interactions can be tuned individually.

Java, except the database interactions, now runs at near C speeds and is generally considered faster than the procedural part of PL/SQL in interpreted mode.

In either case, the speed of SQL is independant of the procedural language and is tuned independantly.

You state you are an OO fan. My experience is that many OO fans do not understand database set theory and end up writing a lot of OO code when they could acomplish the same result through a non-procedural SQL statement (or consecutive set of SQL statements using intermediate tables). In some cases the results can be astonishingly faster than writing OO or even procedural code. I sincerely hope this does not apply to you.

Never the less, I would investigate Oracle's Warehouse Builder to perform exactly the task you describe. This would support the design and implementation entirely visually. (Warehouse Builder is part of the same Deverloper Suite that provides JDeveloper.)

/Hans

Menelaos Perdikeas wrote:

> Hi
>
> I 've got to built an application that would "synchronize" between two
> different database schemas (different structurally but semantically
> equivalent so that a mapping can be defined). Anyway, the logic for
> this mapping or synchronization (which will probably be run once a day
> and involve 1 millions rows) is quite involved and so I would rather
> built a client application in C++ using OCI or in Java using JDBCs to
> mediate between the two instances than rely on the loosely typed
> (according to my taste) PL-SQL. The code will be much more readable,
> maintainable and elegant (in my opionion) in a proper language than in
> PL-SQL. Anyway, thats not what I want to ask. My question is : would
> one expect the C++ or Java implementation to operate in a greatly
> reduced speed compared to PL-SQL ? Being an OO fan and nursing an
> inherent dislike for "languages" like PL-SQL, I would opt for C++ or
> Java even if it were 5 times slower. Do you feel this might be the
> case? ( I am only assuming that PL-SQL would be faster in this
> scenario since the data will not need to make the trip to a client PC
> and then back to the second server but the migration of data will take
> place entirely between the two servers). Any hints ?
>
> Thanks,
> Menelaos Perdikeas.
Received on Wed Jun 18 2003 - 11:32:24 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US