Re: Is perl better? :(((

akizub_at_yahoo.com
Date: 01/30/05


Date: 30 Jan 2005 14:28:16 -0800

Tom:
Thanks for sharing you experience. I really appreciate it.
Especially these are question which I would ask too.
As you already read I have big experience too.

> Wasthe original PERL script hitting an Oracle database?
Exactly the same.

> Why are you calling thousands of SQL statements that just return a
pairs?
I hate such design too. Let say in another query from different
database (and different time) we have these pairs.

>Is there any way to call several of these statements in a single call?
No. pairs are different.

> PERL is great for text manipulation, but I don't think this fact
would cover the gammut of ~2.5x
difference in speed.

That was my impression too. Just before yetaerday's night.

> Did you run an explain plan on your Oracle SQL?
I know I can improve this query. But that's not the point. It will be
improved in both languages and it still will be no difference. SQLs are
exactly the same.
Stupid, impractical but the same.

> Is your Oracle box the same DB that the perl scripts are calling? (Ie
perl hitting
production, java hitting some crappy 90mhz oracle box someone threw
together).

Oracle on one box, Java and perl on another. Both production.

> Are you using SQL hints when tuning your SQL?
Yes and no. The same result. See previous answer about SQL.

> When you step through a debug, are the SQL calls taking the most
time?
Don't use debug only start and end time. Code is simple. See my another
answer in the thread.

>Are you using the same Oracle client software on both test scenarios?
Yes.

> Are you using a persistant connection? (ie not dropping and
reconnecting every script).
Yes. One connection and it's alive for hours. No bad connections or
another exceptions.
Results are the same in perl and Java. But perl runs 2.5 faster.
I run two windows on the same Solaris box. In one I run java. In
another in the same time (it's about one hour) I can run perl program
twice for the same result and have another 10-15 minutes for third run.

> Are you creating a Java application for every script, or are you
creating a
large single Java app that calls all scripts?
All SQLs are in one thread and in one cycle. One by one. Just like
perl.
Of course creating of thousand of threads could be more useful. But
what about poor Oracle? To be honest, our DBAs already called me and
asked to stop my SQL and run in the middle of the night. It was first
call from them in 5 years.

>I don't want the answers to all these, just suggesting some things to
try.
I tried these and a lot of others.
BECAUSE I DON"t WANT TO USE PERL!
I like it too, but support of hundreds of scripts is a nightmare!
And what arguments do I have to switch to Java?
20 minutes vs. hour!

>I know you said you were using the same Oracle, but if all you are
doing is
sending a SQL statement to Oracle, Java is done until you get the
result. It
doesn't sound the same. By same I mean you are connecting to the same
server, same instance with the same client on the same workstation,
just two different languages.

Don't use threads. As well as perl. See previous answer.

>Does your workstation have enough free memory to be running Java?
This is Solaris with 8Gb. Sure enough to store 1000 keys Hashtable.

>On OraclePower.com (ya ya, shameless plug, but I *do* have a point) I
run 17 queries on the home page, and it comes back instantly. Oracle
hauls-ass with Java.

Sorry, don't understand. A lot of resources. Don't know how they can
help me. Mostly I know all this and always was sure that Oracale loves
Java as well as me. But it doesn't help me to prove my point for
managers.
Actually what point? Fact is fact. I can't deny it even I don't like
it.

Maybe it's OCI. But I can't install it on produstion server. I should
use what already exists. So, perl has OCI, JDBC doesn't and perl
forever?
Very sad Certified and with huge experience Java programmer
Alex Kizub.



Relevant Pages

  • Re: Is perl better? :(((
    ... Oracle on one box, Java and perl on another. ... See previous answer about SQL. ...
    (comp.lang.java.databases)
  • Re: Is perl better? :(((
    ... >> Wasthe original PERL script hitting an Oracle database? ... >> Did you run an explain plan on your Oracle SQL? ... Java and perl on another. ...
    (comp.lang.java.databases)
  • Re: Is perl better? :(((
    ... >> Wasthe original PERL script hitting an Oracle database? ... >> Did you run an explain plan on your Oracle SQL? ... Java and perl on another. ...
    (comp.lang.java.programmer)
  • Re: use of DBI; I am getting multiple error messages mixed in with the correct output.
    ... Perl was to relate it to uninitialized values in Java or C++. ... The fact that nulls in SQL have special ... Both Java and C++ have containers that support set theoretic ...
    (comp.lang.perl.misc)
  • Re: what is a "module" in the context of DBMS_APPLICATION_INFO.SET_MODULE?
    ... "Application developers can use the DBMS_APPLICATION_INFO package with Oracle Trace and the SQL trace facility to record names of executing ... i assume that the use of the word "module" there is used in the general sql sense ... Web modules - I like to use a lot of DBMS_A_I ... to see where Java is a real help for the ...
    (comp.databases.oracle.server)