Data management arrays, maps - CVS

1

I have several questions about how to handle a record module in my application, since the requirement indicates that a CVS file should be loaded with approximately 18mil to 20mil records . The file must be loaded in a JSF application, with PrimeFaces and MySql . Subsequently, through an SP that performs the logic of insertion in the database according to certain characteristics of the given information.

The question would be, although one reads the file and uses certain libraries ... Which would be the most optimal? What kind of List, map, etc , should be used for that number of records?

    
asked by Elgoryboly 05.06.2017 в 05:11
source

1 answer

0

After loading the file, a quick way to record the records is to use a bulk load (Bulk):

LOAD DATA INFILE 'TuArchivo.txt' INTO TABLE tbl_TuTabla
  FIELDS TERMINATED BY ',' ENCLOSED BY '"'
  LINES TERMINATED BY '\r\n'
  IGNORE 1 LINES;

You can check these links: link link

    
answered by 05.06.2017 в 05:33