FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


MySQL scaling doubt





alalex
Hi guys,
I'm designing an online platform which needs to work fast for about 100000 users running it at the same time.
I'll put it in a simple way, each new person will add a row to "people" with a unique id, and their data.

Now I want to allow other people to comment on that person, so I am wondering what is the best method to store those comments.

In previous projects I created a new table for each person, which stored all the comments, and the name of the table was the unique id stored in the users index.

Is that the fastest method? What is the best way I could do this in terms of scalability?

Thanks,
Alex
rvec
I think the best way would be to make one table called comments. And give each comment an id and 'from' userid and a 'to' userid. That would also make it easier to sort them on other things (like latest comments, comments from one user , ...).
alalex
Thanks, I'll try it that way Wink
Fire Boar
rvec wrote:
I think the best way would be to make one table called comments. And give each comment an id and 'from' userid and a 'to' userid. That would also make it easier to sort them on other things (like latest comments, comments from one user , ...).


Create an index on these rows as well. That'll speed up searching immensely.
kv
There are lot of parameters you can tune in mysql (set in mysql.ini). These parameters have impact on the performance and scalability. I am not an expert in this area, but you can refer to mysql documentation.

The database type and table type also have impact on the performance and scalability.
Related topics
mysql connection question
php admin and mysql admin console
Mysql And PHP HELP PLZ
Do you use a CMS script?
Question about MySQL!
PHP, MySQL...
PHP Book (Php and Mysql for Dynamic Web Sites)
few mysql questions
E-Cards with PHP & MySQL
Mysql error!
New to the Forums
CMS recommendation.
Looping through multiple mysql results
did my sql is unlimited
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.