sql - 在sql server中存储大文件

标签 sql

在 sql server 中存储大型照片/文本文件的最佳做法是什么。除非需要可扩展性,我们只使用 1 个服务器。

我觉得在 sql 中存储文件路径而不是 blob 更好。这是真的?如果我们必须扩展软件,我们是否仍应遵循这种方法。

最佳答案

这取决于文件的大小。

关于这个主题,有一份很好的 Microsoft 白皮书,here .

objects smaller than 256K are best stored in a database while objects larger than 1M are best stored in the filesystem. Between 256K and 1M, the read:write ratio and rate of object overwrite or replacement are important factors



当然,他们的结论特定于 SQL Server(2005 和 2008 R2)。

关于sql - 在sql server中存储大文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4557392/

相关文章:

搜索查询中的 java.lang.NullPointerException

php - SQL 语句不会限制。显示没有结果

sql - PostgreSQL v9.5+ 更新插入

mysql - SQL : Replace integer with string when there is empty value

sql - 如何合并两个更新语句

sql创建带有约束的表

php - API 的安全 MySQL 查询

sql - dlookup 多个表并将文本框设置为结果 Access 2007

mysql - mysql如何实现自增?

c# - 如何将存储过程中的大量参数从代码传递给SQL Server