Re: Does Connector/J 5.0 supports simulanious quries

Mark Matthews <[email protected]> Thu, 3 Jul 2008 08:42:24 -0500
Newsgroups gmane.comp.db.mysql.java
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Jul 1, 2008, at 6:25 AM, M E wrote:

> Hi I am new here
>
> I have multi-threaded program which are  connecting via Connector /  
> j 5.0 driver
> on each thread there is a query.
>
> I think there is a chance that Connector / j 5.0 driver receive a  
> query statement while another query still in progress, Is that will  
> cause my a problem.
>

Mohammed,

The MySQL protocol itself doesn't support simultaneous queries.  
Connector/J will make it *appear* that your application is able to  
issue them, but they are not executing concurrently, they will be  
serialized by the driver.

> I am worry that My-SQL or  Connector / j 5.0 driver do NOT support  
> multi-queries.

Why do you want to have a thread->query mapping? It's not going to  
give you better performance, you'll end up paying a lot of  
synchronization overhead. Instead you should give each thread a  
connection, or use a connection pool.

	-Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)

iEYEARECAAYFAkhs10EACgkQtvXNTca6JD+4kgCgskksg5/nwG4Z+LVln5VJ3WmG
o68AnihbmgmvY7H2BG01kmtHvS3K683C
=8DQ2
-----END PGP SIGNATURE-----

-- 
MySQL Java Mailing List
For list archives: http://lists.mysql.com/java
To unsubscribe:    http://lists.mysql.com/[email protected]