Hello,
In the attached notebook, the last two statements are problematic. The first of the two never completes, and the second is very slow. Youll need access to a MySQL database to test this. (Easily obtain the installer from the MySQL website.)
Here is a code excerpt:
(* In the next statement, modify MACHINE, USER, and PASSWORD to your MySQL installation.*)
conn = OpenSQLConnection[
JDBC["MySQL(Connector/J)", "MACHINE:3306"],
"Name" -> "DATABASE",
"Username" -> "USER",
"Password" -> "PASSWORD",
"Catalog" -> "DATABASE"
]
SQLDropTable[conn, "blobs"];
SQLCreateTable[conn, "blobs",
{
SQLColumn["a", "DataTypeName" -> "DOUBLE"],
SQLColumn["b", "DataTypeName" -> "DOUBLE"],
SQLColumn["mblob", "DataTypeName" -> "MEDIUMBLOB"]
}
];
cols = SQLColumnNames[conn, {"blobs", "%"}][[All, 2]]
blobRecords = Table[{0, 0, SQLBinary@ConstantArray[0, 1920000]}, {144}];
SQLExecute[conn, "truncate table blobs"];
(* The next statement never completes. Usually blows Java heap. *)
SQLInsert[conn, "blobs", cols, blobRecords];
(* The next statement completes (assuming correct starting condition), but is very slow. *)
SQLInsert[conn, "blobs", cols, #] & /@ blobRecords;
Is there a way to make both statements complete quickly? Total data going to the DB is only in the 100s of MB (200-300 MB).
Thank you,
Vince
Attachments: