Which is faster.... wheeeee!

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Which is faster.... wheeeee!

Post by Gen-ik »

I'm currently creating a 'real-time' chatroom and wondered which of these you think is faster..

a) Reading and writting to multiple mySQL databases

b) Reading and writting to multiple .txt files

..think fast :)
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

mysql
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

MySQL, if you try mysql in command line to read a text or something it takes 0.00 seconds. Where as if you use file system it'll be slower than 0.00 since you have to open file, read file, close file the process for this file system is slower than mysql.
Gen-ik
DevNet Resident
Posts: 1059
Joined: Mon Aug 12, 2002 7:08 pm
Location: London. UK.

Post by Gen-ik »

Ok.. so MySQL is faster.

Thanks. That has helped me out a lot. I didn't want to create 2 version of the code to try out each way. I can now stay in bed longer than ever :D
Post Reply