in reply to Re: Which is quicker - writing to a file or inserting into a db?
in thread Which is quicker - writing to a file or inserting into a db?

If I'm not checking whether the emails are duplicates or not (meaning duplicate emails are getting appeneded to the file)...does it matter that the files keeps getting bigger and bigger? Will that affect performance at all?

I was thinking of appending to the file and then when the time comes just hashing everything to find the unique emails.

  • Comment on Re^2: Which is quicker - writing to a file or inserting into a db?

Replies are listed 'Best First'.
Re^3: Which is quicker - writing to a file or inserting into a db?
by eserte (Deacon) on Dec 14, 2007 at 00:12 UTC
    There's no performance penalty in appending to a large file.

    But you should probably think about locking, as multiple processes simultaneously writing to the same file may cause problems. Or just make sure that each process writes to its own file, e.g. by appending $$ to the file name.