I am developing a web-based application, which processes high amount of data (200.000 - 500.000 rows) with a Java
applet, then the data has to be inserted into MySQL
. Java
is a must, it cannot be ignored or replaced
Which method would be faster and more hassle-free, secure?
Parse the data in Java, send the generated
TreeMap
to thePHP
withGZIP
compression, then prepare the rows inPHP
with$q -> bind_param($a, $b, $c);
, then$q -> execute();
.Or parse the data in
Java
withbatchStatement.addBatch();
, create manyINSERT
statement, write that toString
, compress that withGZIP
, send it toPHP
, then fromPHP
, executeLOAD_FILE('xy.tar.gz');
in MySQL.