文件比较 [英] File Comparsision
问题描述
全部好,
我想比较包含数据库数据的2个平面文件。
i应该将旧文件与新文件进行比较,并希望创建3个文件
,这些文件被删除,添加,修改
delete应该包含新文件中没有的数据
添加的应该包含旧文件中没有的数据
修改后应该包含这些是在新文件中修改的值。
我用java编写的代码用于较小的文件。但随着文件大小的增加,它会让我失去内存异常。
我尝试增加Jvm内存。但没有任何工作可以任何人告诉我任何其他方式。
i我正在使用ArrayLIst存储值
提前谢谢
HI All,
I want compare 2 flat files which contains data from database .
i should compare the old file with new files and want to create 3 files
which are deleted , added , modified
delete should contain the data which are not there in New File
added should contain the data which are not there in Old file
modified should contain which are values modified in new file .
i have written code for this using java it works for smaller files . but as the file size increase it is giving me Out of Memory exception .
i tried by increasing the Jvm memory . but nothing is working can any one tell me any other way .
i am using ArrayLIst to store the values
Thanks in advance
推荐答案
HI All,
我想要比较包含数据库数据的2个平面文件。
i应该将旧文件与新文件进行比较,并希望创建3个文件
,这些文件被删除,添加,修改
delete应该包含新文件中没有的数据
添加的应该包含旧文件中没有的数据
修改后应该包含这些是在新文件中修改的值。
我用java编写的代码用于较小的文件。但随着文件大小的增加,它会让我失去内存异常。
我尝试增加Jvm内存。但没有任何工作可以任何人告诉我任何其他方式。
i我正在使用ArrayLIst来存储值
预付谢谢
HI All,
I want compare 2 flat files which contains data from database .
i should compare the old file with new files and want to create 3 files
which are deleted , added , modified
delete should contain the data which are not there in New File
added should contain the data which are not there in Old file
modified should contain which are values modified in new file .
i have written code for this using java it works for smaller files . but as the file size increase it is giving me Out of Memory exception .
i tried by increasing the Jvm memory . but nothing is working can any one tell me any other way .
i am using ArrayLIst to store the values
Thanks in advance
你开始遇到问题的文件大小是多少?大约有多少行?
What size of files do you start getting problems at? Approx how many lines?
你开始遇到问题的文件大小是多少?大概多少行?
What size of files do you start getting problems at? Approx how many lines?
大约150 MB的文件存在问题。 1 MB文件包含1800行...所以它将是大约2,70,000行
around 150 MB files are giving problem . 1 MB files contains 1800 lines .. so it will be approximate 2,70,000 lines
大约150 MB文件给出问题。 1 MB文件包含1800行..所以它将是近似2,70,000行
around 150 MB files are giving problem . 1 MB files contains 1800 lines .. so it will be approximate 2,70,000 lines
150mb文件相当大。如果你没有得到更好的解决方案,你可能最终会尝试将文件首先拆分为较小的文件并比较较小的文件。这将需要大量的工作。
不能在数据库端使用SQL进行比较吗?
Well 150mb file is pretty big. If you don''t get a nicer solution you may end up trying splitting the files first into smaller files and comparing the smaller files. This will require a lot of work.
Can''t the comparisons be done using SQL at the database side?
这篇关于文件比较的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!