> I have two e-commerce codes:
> 1. Linux + Apache + JServ + JBuilder 3 C/S (using mm.mysql) + MySQL
> 2. NT + IIS + Delphi 4 C/S (using Zeos) ISAPI + MySQL
> The codes are the same (difference is Java or Object Pascal only).
>
> However, the Delphi code is MUCH faster than Java code.
> Look at this:
> 1. First site page loading:
> - Delphi: 3s
> - Java: 7s
> 2. Search engine into 15.000 product records:
> - Delphi: 5s
> - Java: 8s
> 3. Page process:
> - Delphi: 1..2s
> - Java: 5..7s
>
Since you don't mention which *implementation* of Java you are using,
you may be able to speed up your Java code quite a bit by using the IBM
JDK1.1.8 implementation, which some people consider to be 3x (or more)
faster than the Blackdown (Sun) JDK for Linux.
On the page processing side, it seems likely there is some performance
issue not related to the database, or even the JDK version. If you are
worried about MySQL speed, you should try running the same queries "by
hand" in the MySQL command line interface, or using
System.currentTimeMillis() to measure times used by key database calls.
Otherwise you should obtain a profiling tool and look at your app.
In our application we search our MySQL database doing geographical
distance calculations in SQL and return hundreds of records in a second
or so.
-Cris