AFAIK, creation of connection from DB is expensive.  This is one of the
reasons why we need connection pooling.

Best Regards,
Jonathan Chiu
OOCL Logistics
Unit 1, 4/F., Sun Hung Kai Centre, 30 Harbour Road, Wanchai
TEL: 852 . 2990 0174
FAX: 852 . 28249017

-----Original Message-----
From: Haitao Jiang [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, June 08, 2004 8:14 AM
To: mysql
Subject: Idea to speed up multiple jdbc connections?

Hi,

I would appreciate any help on this: I got approximate
same timing on following two:

case 1: create 1 jdbc connection and issue 4 queries
sequentially

case 2: create 4 jdbc connections and issue 4 queries
via 4 different threads at the same time

The timing is done around statement.execQuery(query),
so overhead of multithreading can be ignored.

I would think case 2 should be faster, but it was not.

Any idea?

Thanks a lot
PS: the mysqld server 4.1.1a is running with 16
threads 


        
                
__________________________________
Do you Yahoo!?
Friends.  Fun.  Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/ 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:
http://lists.mysql.com/[EMAIL PROTECTED]



IMPORTANT NOTICE
Email from OOCL is confidential and may be legally privileged.  If it is not intended 
for you, please delete it immediately unread.  The internet cannot guarantee that this 
communication is free of viruses, interception or interference and anyone who 
communicates with us by email is taken to accept the risks in so doing.  Without 
limitation, OOCL and its affiliates accept no liability whatsoever and howsoever 
arising in connection with the use of this email.  Under no circumstances shall this 
email constitute a binding agreement to carry or for provision of carriage services by 
OOCL, which is subject to the availability of carrier's equipment and vessels and the 
terms and conditions of OOCL's standard bill of lading which is also available at 
http://www.oocl.com.

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to