UseCompression with Connector 5.1.21
Posted by: Thomas Steiger
Date: July 13, 2012 12:27AM

Hello

I am using traffic compression to reduce traffic when connecting to remote severs. After updating the connector to Version 5.1.21 compression does not work any more. With Version 5.1.6 or even 5.0.8 everything works fine.

Sample code:
StringBuffer sb = new StringBuffer();
sb.append("jdbc:mysql://192.168.0.45:3306"+"/?useUnicode=true&characterEncoding=latin1&useCompression=true");
Class.forName("com.mysql.jdbc.Driver").newInstance();
Connection c = DriverManager.getConnection(sb.toString(), "root", "pass");
Statement s = c.createStatement();
s.execute("Use myDB;");
ResultSet rs = s.executeQuery("Select * from draw_line;");

Observations with this example:
Connector 5.1.21: Traffic up to 20 Megabytes/s for ~4 sec
Connector 5.1.6: Traffic up to 2Megabytes/2 for ~7 sec

Specs:
MySQL Server 5.5.25 on Windows Server 2008R2 64 Bit

Can you please tell me how to tune the connection such that compression works with the new connector?

Thanks in advance,
Thomas



Edited 1 time(s). Last edit at 07/13/2012 12:51AM by Thomas Steiger.

Options: ReplyQuote


Subject
Written By
Posted
UseCompression with Connector 5.1.21
July 13, 2012 12:27AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.