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

From: Ramon F Herrera <ramon_at_conexus.net>
Date: Sun, 6 Sep 2009 10:32:28 -0700 (PDT)
Message-ID: <76680ca8-30d4-4d34-bbcb-a33c435b4df7_at_h13g2000yqk.googlegroups.com>



On Sep 6, 11:03 am, John Hurley <johnbhur..._at_sbcglobal.net> wrote:
> On Sep 6, 10:04 am, Ramon F Herrera <ra..._at_conexus.net> 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!

John,

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