I want to store my data in SQLite
database, but writing large numbers of data its too slow.
For example:
db = JDBC["SQLite", "f:\\test1.db"];
conn = OpenSQLConnection[db];
SQLCreateTable[conn,
SQLTable["TEST"], {SQLColumn["COL1", "DataTypeName" -> "INTEGER"],
SQLColumn["COL2", "DataTypeName" -> "DOUBLE"]}];
SQLInsert[conn, "TEST", {"COL1", "COL2"},
RandomReal[{-10, 10}, {100, 2}]]; // AbsoluteTiming
(*{11.814676, Null}*)
Inserting 100 lines of data take more than 10s on my PC, but when I use SQLite Database Browser
(external software) for creating table with more than 80000
lines its take less than 1 minute.
Why inserting from Mathematica
so slow?
EDIT
But HSQL
much more faster 3.5s for 80000
lines
Comments
Post a Comment