任何 DBMS 都可以发送/接收巨大的矩阵吗?

发布于 2024-10-23 20:46:19 字数 421 浏览 7 评论 0原文

我正在尝试交流 LAPACK 库和 .net 这样我就可以在 DBMS 之外进行一些处理。

是否可以以二进制或直接内存指针的形式发送/接收完整矩阵来处理它们?主要目的是速度并避免通过平面文件。

  • Oracle、SQL Server、MySQL 是否有可能支持这种技术?
  • 对于 LAPACK 等库,我们可以将二进制文件或其他内容导出到 .netc# 吗? (全部通过原始内存指针或二进制文件)

I am trying to communicate LAPACK library and .net so I can do some processing outside a DBMS.

Is it possible to send/receive complete matrices as binary or as a direct memory pointers to process them? The main purpose is speed and avoid passing through a flat file.

  • Is it possible that Oracle, SQL Server, MySQL support this technique?.
  • What about libraries as LAPACK, can we export binaries or something to .net, or c#?
    (All through raw memory pointers or binaries)

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

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

发布评论

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

评论(3

一个人的旅程 2024-10-30 20:46:19

“巨大”有多大?

您可以将二进制数据存储为 BLOB。它可用于图像、音频、视频、文档。不知道是否有适合 lapack 的“本机”格式。

您无法提供内存地址,因为数据来自磁盘,并且无法保证 Oracle 是否会将它们放入进程内存或共享内存中,无论哪种方式,它都可能随时回收该内存或用其他内容覆盖它。

如果您谈论的是 C#/.Net,那么您可能谈论的是 Windows,无论如何它实际上并不允许在不同进程之间共享内存。当然,如果 Oracle 服务器与 .Net 服务器位于不同的计算机上,那么无论如何您都无法从远程计算机访问内存。

How big is "huge" ?

You can store binary data as BLOBs. It can be used for images, audio, video, documents. Don't know if there is a 'native' format appropriate for lapack.

You can't give memory addresses as the data comes from disks and there's no guarantee whether Oracle will put them through process memory or shared memory, and either way it might reclaim that memory at any time or overwrite it with something else.

If you are talking C#/.Net, you are probably talking Windows which doesn't really allow memory to be shared between different processes anyway. Of course if the Oracle server is on a different machine from the .Net stuff, then you couldn't access memory from a remote machine anyway.

筱果果 2024-10-30 20:46:19

我没用过,但是Oracle的包UTL_NLA 据称可以在单个 VARRAY 中存储最多包含 100 万个条目的矩阵,然后可以相对轻松地将其传递到其他系统。

来自文档:“UTL_NLA 包公开了对表示为 VARRAY 的向量和矩阵进行 BLAS 和 LAPACK(版本 3.0)操作的子集。”

I've never used it, but Oracle's package UTL_NLA can supposedly store a matrix with up to 1 million entries in a single VARRAY, which could then be passed to some other system relatively easily.

From the docs: "The UTL_NLA package exposes a subset of the BLAS and LAPACK (Version 3.0) operations on vectors and matrices represented as VARRAYs."

空城缀染半城烟沙 2024-10-30 20:46:19

简短的回答是否定的,你不能。
SQL 数据库、Oracle 包含返回数据集,并且它们可以在该集的列中包含二进制数据。在这样的 blob 中可以是几乎任何大小的任何格式。客户端需要进行哪些处理?
如果这是某种统计分析,请检查 Oracle 分析功能。他们非常强大,任何客户都很难击败他们。

The short answer is NO, you can't.
SQL databases, Oracle included return sets of data and they can contain binary data in a column of that set. Within such a blob can be any format of almost any size. What processing needs to be done on the client?
If this is some kind of statistical analysis, check the Oracle analytical functions. They are VERY powerful and it will be very hard for any client to beat that.

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