title: Best collection to use to store huge data
body: <p>I need to store huge number of strings in a collection. I dont need a map since I have only the Key. The data size may come upto 4 million or greater. Currently I am using LinkedHashSet. The performance of linkedhashSet is good but it uses hell a lot of memory. I tried LinkedList and it takes too much time. </p>
  
  <p>My requirements are I need to maintain the insertion order. check each item is available in the list/set before throwing a error if its present. </p>
  
  <p>I also tried using comma separated string but it also didnt give much of an improvement.</p>
  
  <p>Could anybody suggest a better solution.</p>