Topic: flat file vs. database

which is better? faster? pros and cons of each.

i'm considering Limbo for my production site and it has the option of either flat file or database and i was wondering which is better and/or faster or more secure.

~James
FluxBB - Less is more

Re: flat file vs. database

well a database is going to be faster as it takes time to open, write and save files whereas a database is always open, the advantage of not using a database is your host doesn't need to support a database, however it is presumably faster to read files hence caching them

Re: flat file vs. database

got it, thank you.

~James
FluxBB - Less is more

Re: flat file vs. database

oh also i think files can be read simultantiously whereas in sql the table is locked while a query is being run, this isn't going to affect you unless you have alot of hits though

Re: flat file vs. database

I think the table is only locked if you are inserting into it or updating it, so it shouldn't be slowed down by reading. Also if your files are small enough (and they are used enough) then they will probably be kept in memory by the operating system.

I like soup.

6 (edited by middleground 2005-01-26 02:02)

Re: flat file vs. database

similar question- db stored themes or files (currently files)...??

and does lightly loaded server versus busy one make one lean one way or the other?


for me db is better, "order by" advantage enough. easier to backup as well.

Every Day Above Ground Is A Good One!!

Re: flat file vs. database

i would have thought if the data is going to be read alot more than written (by alot i mean many 1000s of times) and it only needs to be read not queried then flat files will be better, as only one query is run at once on the database