Re: Any Pro*C/C++ users out there?

From: Ramon F Herrera <>
Date: Sun, 6 Sep 2009 10:32:28 -0700 (PDT)
Message-ID: <>

On Sep 6, 11:03 am, John Hurley <> wrote:
> On Sep 6, 10:04 am, Ramon F Herrera <> wrote:
> snip
> > I will have more questions and comments about the precompiler, as I
> > claim that it provides the fastest possible access to Oracle, compared
> > with alternatives such as Java or PL/SQL.
> Have fun ... I think the point is that depending on what you can do
> with C ... you can write some fast running programs against an oracle
> database.
> You will have to do apples to apples comparisons in the types of
> processing you do in plsql versus c of course.

 > It would be real nice to have some benchmarked samples  > for test cases of C versus plsql versus java!


Perhaps my scenario is specific to me, but you don't need any benchmarks to measure the following kind of performance differential.

In one of my main applications, I had a large number of very similar (let's say identical) tables. Such tables, for policy reasons could not be combined into a big one.

My application was like this:

for table = client1 ... client1000

   Retrieve stuff from table
end for

The above can be coded in two ways:

(1) The whole thing (external loop and actual SQL access) is coded in PL/SQL (2) The external loop can be written in an efficient and fast language such as C/C++ and the inner SQL access in "EXEC SQL" (aka Pro*C/C++).

The fundamental problem in my case is that Oracle doesn't like it too much when the table name is a variable, it seems.

In any event, my latest approach (2) is orders of magnitude faster that my old, discarded approach based on pure PL/SQL (stored procedures).

Your mileage may vary, of course.

As far as Java (one of my favorite all-time languages! - Have several Java programs that I would never port) there is no way it can even approach the performance of a native language.

-Ramon Received on Sun Sep 06 2009 - 12:32:28 CDT

Original text of this message