4 messages in com.mysql.lists.javaRe: mysql/jdbc stalling
FromSent OnAttachments
Jan Pfeifer16 Dec 2003 12:41.java, .sql
Mark Matthews16 Dec 2003 13:20 
Jan Pfeifer16 Dec 2003 16:30 
Mark Matthews16 Dec 2003 17:41 
Subject:Re: mysql/jdbc stalling
From:Mark Matthews (ma@mysql.com)
Date:12/16/2003 01:20:54 PM
List:com.mysql.lists.java

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

Jan Pfeifer wrote:

hi,

i've written about this a couple of weeks ago. After some more testing and different versions i still haven't manage to get mysql+jdbc working.

the java source code as well as the database dump used for the test is attached.

i've run it in two different machines:

on a debian stable PII-333, mysql 3.23.49, connector 3.0.8, j2sdk 1.4.1_02:

$ time java Test > /dev/null

real 0m2.516s user 0m2.000s sys 0m0.030s

on a debian unstable AthlonXP2100+, mysql 4.0.16 (although i tried the 3.23.+recent and 4.1.snapshot), connector 3.0.9 stable (i tried the snapshot) i get:

$ time java Test > /dev/null

real 0m13.576s user 0m0.420s sys 0m0.028s

notice the real time, the system was idle the whole period of the test. JDBC/Mysql/something in between stalls during executeQuery method.

Are you sure it's not a Java on Debian problem? I tried your test on RHAS 3.0 on a PIII XEON (I don't have debian installed here), and the following is what I get:

real 0m2.232s user 0m1.680s sys 0m0.050s

If you remove your System.out.println()s (which cause a _lot_ of console I/O, thus increasing the amount of time for the entire cycle), I get:

real 0m2.069s user 0m1.620s sys 0m0.070s

If I fire up an 'empty' main method on a class, the times look like:

real 0m0.679s user 0m0.570s sys 0m0.040s

If I measure the time that your loop runs, using System.currentTimeMillis(), I get 310ms to run the entire loop, so your time is getting eaten up somewhere else, as far as I can tell.

Can you tell me what a similar measurement is on your system? I have a feeling that your JVM is sucking up a lot of time on startup for some reason.

Regards,

-Mark - -- Mr. Mark Matthews MySQL AB, Software Development Manager, J2EE and Windows Platforms Office: +1 708 557 2388 www.mysql.com

Are you MySQL Certified? http://www.mysql.com/certification/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQE/33dLtvXNTca6JD8RApt/AJwP9eMkWtn4YeIZshPVr6fFxPKhdACeJNDJ JPSmiYm3B0iJWxRy6AQakWc= =1wq2 -----END PGP SIGNATURE-----