[This reply is migrated from our old forums. The original author name has been removed]
Re: Export Huge Table
I have two servers. One with MySQL 5.5.2 m2 and the other with MySQL 5.1.14 GA. My JDBC driver is ConnectorJ 5.1.12 GA. The problem occurs when export on both servers.
Roger Bjärevall
said
almost 15 years ago
[This reply is migrated from our old forums.]
Re: Export Huge Table
Hi,
Thanks!
The default behavior for the Connector/J drivers from MySQL is to cache the entire result set in memory. So in this case the use of DbVisualizers @export command is of less use.
To workaround this you simply set the following Driver Property in DbVisualizer:
java.sql.statement.setFetchSize = -2147483648
You find this by selecting the Connection tab for the actual MySQL connection. Then click the Connection sub tab and select the Driver Properties category.
Also make sure you are using the latest available JDBC driver supported for your DB servers.
Best Regards
Roger
a
anonymous
said
almost 15 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Export Huge Table
Dear Roger,
I am not sure if I follow you instruction correctly. In the driver properties setion, I set the defaultFetchSize = -2147483648. That cause the connection error while browse around the database.
An error occurred while executing the database request for:
MySQL
5.5.2-m2-community
MySQL-AB JDBC Driver
mysql-connector-java-5.1.12 ( Revision: ${bzr.revision-id} )
Short message:
Operation not allowed after ResultSet closed
The command that caused the problem:
SELECT
TABLE_NAME,
TABLE_TYPE,
ENGINE,
VERSION,
ROW_FORMAT,
TABLE_ROWS,
AVG_ROW_LENGTH,
DATA_LENGTH,
MAX_DATA_LENGTH,
INDEX_LENGTH,
DATA_FREE,
AUTO_INCREMENT,
CREATE_TIME,
UPDATE_TIME,
CHECK_TIME,
TABLE_COLLATION,
CHECKSUM,
CREATE_OPTIONS
FROM
information_schema.tables
WHERE
table_schema = 'r225'
and table_type NOT IN ('VIEW')
ORDER BY
TABLE_NAME
Long Message:
Operation not allowed after ResultSet closed
Details:
Type: java.sql.SQLException
Error Code: 0
SQL State: S1000
System Information:
Product: DbVisualizer Personal 7.0.4
Build: #1494 (2010/02/24 08:28)
Java VM: Java HotSpot(TM) 64-Bit Server VM
Java Version: 1.6.0_14
Java Vendor: Sun Microsystems Inc.
OS Name: Windows Vista
OS Arch: amd64
OS Version: 6.0
a
anonymous
said
almost 15 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Export Huge Table
Dear Roger,
I edited two parameters in the Driver Properties and successfully changed the recordset to be server-sided.
1. Set useCursorFetch = true
2. Set defaultFetchSize = 5000
Thanks for your kindly advise.
Best regards,
Chih-Hsin Lee.
Roger Bjärevall
said
almost 15 years ago
[This reply is migrated from our old forums.]
Re: Export Huge Table
Hi,
I said you should set java.sql.statement.setFetchSize = -2147483648 by inserting it into the list. defaultFetchSize = -2147483648 is something else.
Regards
Roger
Edited by: Roger Bjarevall on 2010-mar-01 16:09
Roger Bjärevall
said
over 14 years ago
[This reply is migrated from our old forums.]
Re: Export Huge Table
Hi,
These properties are now described in the FAQ section for the MySQL JDBC driver:
http://www.dbvis.com/products/dbvis/doc/supports.jsp?db=MySQL#MySQL
Best Regards
Roger
anonymous