在 SQL Server 中存储音频? [英] Store audio in SQL Server?

查看:44
本文介绍了在 SQL Server 中存储音频?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将音频文件(mp3、wav)作为 BLOB 存储在 SQL Server 中是个好主意吗?优点之一似乎是节省硬盘空间.这对可扩展性或性能有任何影响吗?

Is it a good idea to store audio files (mp3, wav) in SQL Server as BLOBs? One of the merits appears to be saving Hard disk space. Does this have any impact on scalability or performance?

推荐答案

不,这不是一个好主意 :) 可变大小的字段(例如 TEXT 和 BLOB)具有各种性能影响.更好的方法是将文件存储在磁盘上,并在数据库表中维护对它们的引用.如今,硬盘空间如此便宜(尤其是与 CPU 和 I/O 性能相比),甚至不应该成为问题.

No, it's not a good idea :) Variable-sized fields (such as TEXT and BLOB) have all sorts of performance impacts. A better approach is store the files on disk and just maintain a reference to them in a DB table. Nowadays, hard drive space is so cheap (especially compared to CPU and I/O performance) that it shouldn't even be a concern.

这篇关于在 SQL Server 中存储音频?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆