什么存储位置(SQL Server 或文件系统)可以提高保存 tiff 图像的性能?

发布于 2024-07-30 18:57:02 字数 247 浏览 4 评论 0原文

我们的系统需要存储大小约为 3k 的 tiff 图像。 我们在给定时间收到约 300 张图像,需要快速处理它们。 一旦收到约 100,000 张图像,这些图像就会从我们的系统转移到另一个存档系统或被清除。

我正在寻找图像文件初始保存的最佳性能。 传输图像进行存档的任务对性能的要求较低。

什么存储位置(SQL Server 或文件系统)可以提高保存 tiff 图像的性能?

还有其他注意事项或陷阱需要注意吗?

Our system needs to store tiff images of ~3k in size. We receive ~300 images at a given time and need to quickly process them. Once ~100,000 images are received, the images are transferred off our system to another archival system or purged.

I am looking for best performance in regards to the initial save of the image files. The task of transferring the images for archival is less performance critical.

What storage location, SQL Server or file system, would result in better performance in saving tiff images?

Are there any other considerations or gotchas to be aware of?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

流星番茄 2024-08-06 18:57:14

巴西 INPE 的卫星目录系统存储文件系统中存储的 tiff 图像的引用。 但图像有点大 - +/- 100 MB。 如果文件必须在浏览器上显示,则 php 代码会读取磁盘上的 tiff 内容并绘制它。

The satellite catalog system at INPE/Brazil stores a reference of tiff images stored in filesystem. But the images are a little bigger - +/- 100 MB. If the file must be displayed at browser, the php code reads the tiff content at disk and draw it.

朦胧时间 2024-08-06 18:57:13

SQL Server 2008版本有一个新功能,称为FILESTREAM。 他们的部分文档还包含关于最佳实践的部分,其中MS 人员表示,如果 BLOB 对象通常大于 1 MB,则 FILESTREAM 应该发挥作用。

该 MSDN 页面指出:

何时使用 FILESTREAM
以下条件成立,您
应该考虑使用 FILESTREAM:
- 所存储的对象平均大于 1 MB。 为了
较小的物体,存储
数据库中的 varbinary(max) BLOB
通常提供更好的流媒体
性能。

因此,我猜想,使用 3 KB 的 TIFF,您可以将其很好地存储在 SQL Server 2005 表的 VARBINARY(MAX) 字段中。 由于它比 SQL Server 的 8k 页面大小还要小,因此非常适合!

您可能还需要考虑将 BLOB 放入它们自己的表中,并从那里引用您的“基本”数据行。 这样,如果您只需要查询基础数据(您的 int、varchar 等),您的查询就不会因 BLOB 与其他内容混合存储而陷入困境。

马克

The SQL Server 2008 version has a new feature called FILESTREAM. Part of their documentation also has a section on best practices, in which the MS folks state that FILESTREAM should come into play if the BLOB objects are typically larger 1 MB.

That MSDN page states:

When to Use FILESTREAM If the
following conditions are true, you
should consider using FILESTREAM:
- Objects that are being stored are, on average, larger than 1 MB. For
smaller objects, storing
varbinary(max) BLOBs in the database
often provides better streaming
performance.

So I guess with a 3 KB TIFF, you could store that nicely inside a VARBINARY(MAX) field in your SQL Server 2005 table. Since it's even smaller than the 8k page size for SQL Server, that'll fit nicely!

You might also want to consider putting your BLOBs into their own table and reference your "base" data row from there. That way, if you only need to query the base data (your ints, varchars etc.), your query won't be bogged down by BLOBs being stored intermingled with other stuff.

Marc

单身情人 2024-08-06 18:57:10

根据我的经验,SQL Server 在将 blob 存储到数据库方面做得很好。 只要我遵循与查询、规范化等相关的最佳实践,我发现它们工作得很好。

出于某种原因,我个人不想在我的数据库中存储巨大的 PDF、DOC 和 JPG 文件,但这正是 Microsoft SharePoint 所做的,而且做得很好。

我肯定会考虑将 blob 放入我的数据库中。

In my experience SQL Server has been decent with storing blobs into the database. As long as I follow Best Practices related to queries, normalization, etc. I have found them to work well.

For some reason, I personally do not want to store huge PDF and DOC and JPG files in my database, but then, that is exactly what Microsoft SharePoint does, and does well.

I'd definitely consider putting blobs in my db.

粉红×色少女 2024-08-06 18:57:07

将图像存储在文件系统中将为您提供更好的性能。 您只需将一个条目放入 tiff 图像附件的相关数据库表中 - 并使用它来获取文件系统上图像的路径。

您可能希望通过将图像托管在 Web 服务器 - IIS(如果相关)上来进一步提高性能,并让您的客户端应用程序(再次如果相关)直接从那里检索它们。

Storing the images in the filesystem will give you better performance. You just need to put an entry into a relevant database table for the tiff image attachments - and use that to get the path of the image on the filesystem.

You might want to further boost performance by hosting the images on a web server - IIS (if relevant) and have your client applications (again if relevant) retrieve them directly frmo there instead.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文