HI I have a social network and is wondering what happens when the members increase to large size of like 10 million. Currently the members are still few but is it okay to use the normal select query on a database with 10 million rows? Does it take long? If it takes even a second, i will have to use other options.
i guess you will need to use other options for examples devide the table into multiple tables Or indexes Or seperate DB on a dedicated server fast processor huge ram Regards
By the time your site does actually get that big you'll notice a huge difference in many other things and will have probably already gone to at least a dedicated server. Generally this is when multiple servers are introduced and thus multiples databases are used to reduce the processing required for searching. It's a rather complicated task to be honest.
Performance and scalability issues come in many forms, i.e. hardware, network, software, database, etc. Since you specifically inquired about the database, here are a couple items to consider: reduce or eliminate expensive joins by denormalizing the tables. Also, consider using a caching strategy for non-volatile data. This is a complex topic, so I suggest posting the question in database performance and architecture forums.
My suggestions is use dedicated server and be sure that your queries are index based. At the moment, I'm managing a database that has more than 70GB now and I'm pretty sure that has more than 10 million of records and what I just did before was transferred our shared hosting server to a dedicated server and optimized all the sql queries and after that it works pretty good. But as we grow, we will definitely have a big problem and the only solution for us to do is delete the old records that aren't touch for a year. This way, we could save a lot of money to buy multiple servers and reduce database headache.
It'll take over 1 second, however, instead of worrying about future database overload, get customers first. Chances are that you will not continue your website. Peace,