2

I am thinking about creating an online journal that will hold large amounts of text. I am looking at purchasing one of go-daddys packages that comes with a database of 200mb. So are there any rules of thumb when it comes to storing large amounts of text in a database?

Or would it be better if I stored the data in text files and then request the specific file when it is needed?

4

1 回答 1

2

基本上,您将每个数据行的总最大大小相加,然后将其乘以预期的行数。

该脚本将使您对行大小有一个很好的了解。

    SELECT  OBJECT_NAME(sc.[id]) TableName,
    COUNT(sc.name) NumberColumns,
    SUM(sc.length) + 96 MaxRowLength,
    8060 / (SUM(sc.length) + 96) AS RecordsPerPageFROM  syscolumns sc
    INNER JOIN sysobjects so ON sc.[id] = so.[id]WHERE  OBJECT_NAME(sc.id) = 'Blah'GROUP BY OBJECT_NAME(sc.[id])ORDER BY SUM(sc.length) DESC

此链接将为您提供更多信息 http://www.simple-talk.com/sql/database-administration/estimating-disk-space-requirements-for-databases/

于 2012-10-18T17:14:55.743 回答