I'm interested in using Heroku for my project. I'm not interested in paying for it at the moment but the free plan only offers a 5MB database.
我有兴趣将Heroku用于我的项目。我现在不想支付它,但免费计划只提供5MB的数据库。
Is there any measure I can use to know how many columns/rows of simple text data can be stored in a 5MB database?
是否有任何措施可以用来知道在5MB数据库中可以存储多少列/行的简单文本数据?
Thanks
谢谢
2 个解决方案
#1
31
A little known Heroku secret is the 5 MB is not a hard limit. You can go over it by quite a lot (by 5-10x) before Heroku will get unhappy with you.
一个鲜为人知的Heroku秘密是5 MB不是硬限制。在Heroku对你不满意之前,你可以通过相当多的(5-10倍)来完成它。
In any case, you would be amazed how far 5 MB can get you, particularly if you are creating the data by hand. For instance, if you are storing blog posts - and let's say 20% is overhead (metadata for each blog post), you would need to write 4,000,000 characters of text before your database hit the 5 MB mark, which is more than the contents of War and Peace.
在任何情况下,您都会惊讶于5 MB可以获得多少,特别是如果您手动创建数据。例如,如果您正在存储博客文章 - 并且假设20%是开销(每篇博文的元数据),则在数据库达到5 MB标记之前,您需要编写4,000,000个字符的文本,这超过了战争与和平。
So it won't be enough if you're storing entire books in your database, but if you're writing your next novel in it, you should be good for quite a while.
因此,如果你将整本书存放在你的数据库中是不够的,但是如果你正在写下你的下一部小说,那么你应该好好相当一段时间。
#2
0
The formula is relatively simple to figure out, at least in vague terms. Basically, sum the size of each column, and then multiply that result by the number of rows. While this is a small overhead involved, it's probably small enough to be ignored.
这个公式比较简单,至少用模糊的术语来表示。基本上,将每列的大小相加,然后将该结果乘以行数。虽然这是一个很小的开销,但它可能小到可以被忽略。
#1
31
A little known Heroku secret is the 5 MB is not a hard limit. You can go over it by quite a lot (by 5-10x) before Heroku will get unhappy with you.
一个鲜为人知的Heroku秘密是5 MB不是硬限制。在Heroku对你不满意之前,你可以通过相当多的(5-10倍)来完成它。
In any case, you would be amazed how far 5 MB can get you, particularly if you are creating the data by hand. For instance, if you are storing blog posts - and let's say 20% is overhead (metadata for each blog post), you would need to write 4,000,000 characters of text before your database hit the 5 MB mark, which is more than the contents of War and Peace.
在任何情况下,您都会惊讶于5 MB可以获得多少,特别是如果您手动创建数据。例如,如果您正在存储博客文章 - 并且假设20%是开销(每篇博文的元数据),则在数据库达到5 MB标记之前,您需要编写4,000,000个字符的文本,这超过了战争与和平。
So it won't be enough if you're storing entire books in your database, but if you're writing your next novel in it, you should be good for quite a while.
因此,如果你将整本书存放在你的数据库中是不够的,但是如果你正在写下你的下一部小说,那么你应该好好相当一段时间。
#2
0
The formula is relatively simple to figure out, at least in vague terms. Basically, sum the size of each column, and then multiply that result by the number of rows. While this is a small overhead involved, it's probably small enough to be ignored.
这个公式比较简单,至少用模糊的术语来表示。基本上,将每列的大小相加,然后将该结果乘以行数。虽然这是一个很小的开销,但它可能小到可以被忽略。