A database is usually faster than flat files, and the gap grows larger
as the data size increases. From what I know using caching (memcache,
APC) and/or prepared statements it shouldn't be hard to achieve over
10.000 queries/second on a decent system (someone please correct me if
I'm wrong).

You could also take a look at Comet (server-push technology), but
that's a whole different road to go.

On May 19, 4:24 pm, Null <mauriceder...@gmail.com> wrote:
> Hi all,
>
> To learn some jquery, I am writing some sort of chatbox. My questions
> is: what can I use best to store and retrieve the chat text?? Is it
> good to store the chat text in the database, or is it better to save
> it into a txt file? Ofcourse only new added chat lines will be taken
> and displayed underneeth the old ones.
>
> If you don't have much chatters, a database option is ok, but when you
> ahve 1000 chatters (as an excample) trying to get new lines from the
> database every second (every second a check for new text is done and
> displayed if they are), the database will get slow. Then a txt file
> would be better? Or doesn't it realy matter what to choose? A txt file
> can get big too.
>
> Does anyone has some experience with this and what is the best
> approach: .txt or database?
>
> Kind regards,

Reply via email to