TheFilmGod Posted October 23, 2007 Share Posted October 23, 2007 Okay, so I'm making this site which will have comments for almost everything. Pictures, movie reviews, etc. Each of these will have a row in mysql that lists the number of comments and the ids of the comments. The comments table will have the id of the comment and the text that came with it. The comments table will fill up fast. What if it reaches over 1 billion rows? I heard this creates problems. And how do I make sure its not too slow? Is there a way to make mysql create another table after x amount of rows are created? I don't want more than one billion rows in one table. Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/74523-billions-of-rows/ Share on other sites More sharing options...
Zane Posted October 23, 2007 Share Posted October 23, 2007 Well, you could limit all the users to a set number of comments and perform a query everytime you display them, deleting one to compensate for the limit you gave them if they're past it of course you may want to inform your users Quote Link to comment https://forums.phpfreaks.com/topic/74523-billions-of-rows/#findComment-376646 Share on other sites More sharing options...
TheFilmGod Posted October 23, 2007 Author Share Posted October 23, 2007 what if I don't want to make a limit? What if they can write as many comments as they wish? Quote Link to comment https://forums.phpfreaks.com/topic/74523-billions-of-rows/#findComment-376655 Share on other sites More sharing options...
Zane Posted October 24, 2007 Share Posted October 24, 2007 well, in a sense they could make as many comments as they wanted it's just as soon as their comments went over a certain number it would begin deleting the oldest ones say their limit was 1000 and as soon as began to write what would be 1001 it would delete their very 1st comment bringing them back to 1000 that's the only way I can think of the keep it from getting to a billion Quote Link to comment https://forums.phpfreaks.com/topic/74523-billions-of-rows/#findComment-376662 Share on other sites More sharing options...
TheFilmGod Posted October 24, 2007 Author Share Posted October 24, 2007 Yeah your method would work. But it isn't about "their" comments per se. I wouldn't want to delete comments that others may find helpful. Can mysql handle over 1,000,000,000 rows? (one billion)? And what will happen if it goes over? Quote Link to comment https://forums.phpfreaks.com/topic/74523-billions-of-rows/#findComment-376668 Share on other sites More sharing options...
btherl Posted October 24, 2007 Share Posted October 24, 2007 I believe this is the information you are looking for. Quote Link to comment https://forums.phpfreaks.com/topic/74523-billions-of-rows/#findComment-376681 Share on other sites More sharing options...
Zane Posted October 24, 2007 Share Posted October 24, 2007 Well...I'm sure it all depends on how much space/HD capacity you have to work with as well as the datatypes you're using in the rows MySQL should be able to handle over a billion I got this from http://dev.mysql.com/doc/refman/5.0/en/features.html Scalability and Limits: Handles large databases. We use MySQL Server with databases that contain 50 million records. We also know of users who use MySQL Server with 60,000 tables and about 5,000,000,000 rows. Quote Link to comment https://forums.phpfreaks.com/topic/74523-billions-of-rows/#findComment-376683 Share on other sites More sharing options...
fenway Posted October 24, 2007 Share Posted October 24, 2007 You'd have to look into horizontal partitioning. Quote Link to comment https://forums.phpfreaks.com/topic/74523-billions-of-rows/#findComment-377017 Share on other sites More sharing options...
TheFilmGod Posted October 24, 2007 Author Share Posted October 24, 2007 You'd have to look into horizontal partitioning. ? Quote Link to comment https://forums.phpfreaks.com/topic/74523-billions-of-rows/#findComment-377378 Share on other sites More sharing options...
AndyB Posted October 24, 2007 Share Posted October 24, 2007 ? Google is your friend. Quote Link to comment https://forums.phpfreaks.com/topic/74523-billions-of-rows/#findComment-377381 Share on other sites More sharing options...
Azu Posted October 24, 2007 Share Posted October 24, 2007 64bit MySQL should be able to overcome the 4GB limit easily, no? I'm pretty sure 64bit can handle up to 16 exabytes, which there is NO WAY IN HELL you are going to use up all of. Quote Link to comment https://forums.phpfreaks.com/topic/74523-billions-of-rows/#findComment-377392 Share on other sites More sharing options...
TheFilmGod Posted October 25, 2007 Author Share Posted October 25, 2007 64bit MySQL should be able to overcome the 4GB limit easily, no? I'm pretty sure 64bit can handle up to 16 exabytes, which there is NO WAY IN HELL you are going to use up all of. 16 exabytes? What are those? But the problem isn't as much as Mysql not being able to handle the load, but more if it would be fast enough for all the users to query the comments. The table will probably be accessed over 100 times a minute. Quote Link to comment https://forums.phpfreaks.com/topic/74523-billions-of-rows/#findComment-377443 Share on other sites More sharing options...
Azu Posted October 25, 2007 Share Posted October 25, 2007 Symbol (name) Value Symbol Value Symbol (name) Value kB (kilobyte) 1000^1 = 10^3 KB 1024^1 = 2^10 KiB (kibibyte) 2^10 MB (megabyte) 1000^2 = 10^6 MB 1024^2 = 2^20 MiB (mebibyte) 2^20 GB (gigabyte) 1000^3 = 10^9 GB 1024^3 = 2^30 GiB (gibibyte) 2^30 TB (terabyte) 1000^4 = 10^12 TB 1024^4 = 2^40 TiB (tebibyte) 2^40 PB (petabyte) 1000^5 = 10^15 PB 1024^5 = 2^50 PiB (pebibyte) 2^50 EB (exabyte) 1000^6 = 10^18 EB 1024^6 = 2^60 EiB (exbibyte) 2^60 So basically a gigabyte to the power of 4 Quote Link to comment https://forums.phpfreaks.com/topic/74523-billions-of-rows/#findComment-377463 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.