Alex Rivera | Logout

what is faster database querys or file writing/reading

Asked 2011-01-15T14:54:10.343
11

I know that in normal cases is faster to read/write from a file, but if I created a chat system: Would it be faster to write and read from a file or to insert/select data in a db and cahe results?

Edit
Report

1 Answer

1

Databases by far.

Databases are optimized for data storage which is constantly updated and changed as in your case. File storage is for long-term storage with few changes.

(even if files were faster I would still go with databases because it's easier to develop and maintain)

answered 2011-01-15T14:59:00.847

Your Answer