From: Moya Pilot Date: 2010-04-22T01:11:26+09:00 Subject: When to use a db? Dumb question but I am reading in a constant stream of lines via fastercsv and pushing it into an array. Each line is either a new object or will update some information in an existing object. 98% of all lines will be an update to an object. I will also be doing a lot of lookups on the objects to see if X exists somewhere. I don't have too much experience with this stuff but I have read and been told by a couple people that if I am just iterating repeatedly, updating and doing a bunch of lookups on objects then perhaps a db would be more efficient/faster. I know there isn't a sure fire threshold that states when you are dealing with X amount of data you should use a database but I always assumed that if I am using an array it would be faster since it is in memory. I am not opposed to using something minimal like SQLite I just wasn't sure if things would be easier/faster/more efficient to use a db. Object Persistence is a plus but not a necessity for me, if my script dies and the array is lost it isn't a huge deal. Will using a SQLite DB be faster or easier or more efficient for me than just doing all my iterations thru an array? Thanks -- Posted via http://www.ruby-forum.com/.