|
Posted by Jerry Stuckle on 11/16/07 12:15
Lew wrote:
> Jerry Stuckle wrote:
>> Yes, but MySQL (and many other databases) access through the jdbc
>> drivers is much slower than in PHP. The JDBC driver is often byte
>> code and needs to be interpreted. OTOH, the PHP driver is compiled C,
>> and uses the C calls to the database, which are generally faster.
>
> First of all, bytecode interpretation is a fraction of the overhead of
> talking to a database.
>
> Secondly, all production-grade JVMs optimize the heck out of bytecode to
> a degree at least comparable to C code.
>
And it still isn't nearly as fast as compiled code.
> Do you have citations for the differences in Java MySQL speed and PHP
> MySQL speed?
>
Just experience. No hard facts.
> Do you have citations for the reasons for any differences?
>
Knowledge of drivers and 40 years programming experience, including
around 10 years in Java.
> I am still interested - do you have citations for performance
> differences between the Java / MySQL combination and other Java / RDBMS
> combinations like Postgres or Oracle?
>
DB2 access is also slower, but those are the only two I use regularly.
> I hear the conclusions that have been stated:
>
> - Java / Tomcat to MySQL is slower than other Java / RDBMS combinations.
> - Java / Oracle works better than Java / Tomcat / MySQL.
> - There were severe performance problems (unspecified) with Linux /
> Tomcat / MySQL.
> - These problems necessitated a switch to PHP (implying no other
> solution would have worked?).
> - Java / Tomcat to MySQL is slower than PHP / Apache / MySQL.
> - This latter is due to bytecode interpretation being slower than C
> binary execution.
> - C calls to MySQL are generally faster than JDBC calls to MySQL.
>
> One at least is incorrect. I am interested in the evidence for the others.
>
And which one is incorrect?
Have you actually compared them?
Note that I am NOT bashing Java. I love the language. I am stating
what I have found.
Java is a good language. But it is not the last word in languages that
some people make it out to be. And it is not the fastest or best in
every circumstance.
But then neither is PHP or any other language.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Navigation:
[Reply to this message]
|