MySQL or txt for counter hosting?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
User avatar
kreoton
Forum Commoner
Posts: 42
Joined: Fri Mar 03, 2006 7:27 pm

MySQL or txt for counter hosting?

Post by kreoton »

Hi,
I'm sorry if I posted in wrong forum.

I planning to make counter hosting script, there would be many data, and it should be placed somewhere, so what is better to use mysql or txt driven database?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

MySQL would likely run faster.
User avatar
kreoton
Forum Commoner
Posts: 42
Joined: Fri Mar 03, 2006 7:27 pm

Post by kreoton »

in one forum i got answer:
I say do a mixture of mySQL and text files.

Counters can quickly use up MySQL connections and erver resources when they get popular.

You might consider implementing a queue or FIFO arrangement on the tracking end, then periodically (could be every few seconds or hours depending on the stats you are offering) update the database with the info that is in the FIFO.

There is less opportunity for the remote sites to use up all you database connections and/or processor cycles and compromise you server.

Mike
Maybe you know some examples of using FiFO?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

It's basically a queue that's stored somewhere (in this case a text file) where you can stage updates for later incorporation into the database.

FIFO being First In, First Out.
Post Reply