8 messages in com.mysql.lists.javaRe: SQLException: Communication link ...
FromSent OnAttachments
Jan Pfeifer28 Nov 2003 14:43 
Christopher Taylor28 Nov 2003 17:42 
Jan Pfeifer29 Nov 2003 03:48.java
Mark Matthews29 Nov 2003 06:29 
Jan Pfeifer29 Nov 2003 07:45 
Mark Matthews29 Nov 2003 09:00 
Jan Pfeifer30 Nov 2003 07:45.java, .sh
Jan Pfeifer01 Dec 2003 04:28.java
Subject:Re: SQLException: Communication link failure
From:Jan Pfeifer (pfj@yahoo.com.br)
Date:12/01/2003 04:28:03 AM
List:com.mysql.lists.java
Attachments:

hi Celil, first of all thanks for the answer :)

strangely enough your solution has so far (I ran it a couple of times) avoided the timeouts. But still runs slugguish, leaving the CPU mostly idle while running.

i'm testing now in an old machine, a Debian stable where the jdbc seems to be working, so i increased the loop count to 100 and run the Test.java you sent (*) and timed it:

PII 333Mhz/128Mb mem/Debian Stable, MySql 3.23.49, Java 1.4.2_01, J/Connector 3.0.8: (hundred times reading a 8600 record table of (name varchar(20) primary key) filled with random names):

$ time java Teste ... real 0m21.932s user 0m12.770s sys 0m0.250s

on Athlon XP2100/512Mb/Debian Unstable, MySql 4.0.16, Java 1.4.2_02, J/Connector 3.0.9 (though i've tried other Java versions, J/Connector 3.0.8, and also kernels 2.4 and 2.6)

$ time java Teste ... real 1m54.383s ---> CPU idle most of the time ... user 0m2.522s sys 0m0.067s

i'm sending attached the Teste.java file and half (it didn't fit all) of the "player" table i'm reading as a test.

thanks again,

jan

ps.: (*) notice that from the Teste.java file you've sent i commented out reading/printing the fields. Btw., the idea of the test.sh file i sent was just to compare the speed of doing the same queries through the command line interface.

Celil Germeyan wrote:

I am attaching Teste.java and teste.sh files which work. I tested them. Please read the comments in the files.

Hope helps, cg