Re: speed: file vs. DB
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: speed: file vs. DB

From: Erwin Moller <since_humans_read_this_I_am_spammed_too_much@spamyourself.com>
Date: Tue Jul 05 2005 - 12:11:48 CEST

0000=year wrote:

> Hi
>
> I am the administrator of TSEP - The Search Engine Project
> (www.tsep.info). We developer are unclear about the speed of two different
> methods: Is it faster to
> a) write to a file
> or
> b) update a record in a database
>
> Olaf
>

Hi Olaf,

Do you only want to write some data away, or do you want to retrieve the
data later?
If you want to retrieve it later: use a database.
A database can use indexing, making retrieval of data much faster.

If you just want to write it away: I do not know. I guess filewriting speed
depends on filesystem you use, HD-speed, fragmentation, and the number of
files already on the filesystem.

My guess is your best bet is a database for most situations.

Regards,
Erwin Moller
Received on Mon Oct 17 21:02:20 2005