了解oracle中的Lob段(SYS_LOB)?

发布于 2024-07-13 06:29:37 字数 324 浏览 4 评论 0原文

大多数表(如果不是全部)都有一个“blob”字段。 其中一个存储用户操作日志的表现已增长到 8 GB(约 500 万条记录)。

我们的 DBA 已经看到这种模式现在正在以指数方式消耗空间。 我们进行了一番调查,发现其中一个带有 (SYS_LOB) 的表占用了 140GB 数据库中大约 116GB 的空间。

我们的DBA告诉我们这个表与保存用户操作日志的表(8GB)有关。

有人知道这个SYS_LOB表是做什么的吗? 实际的 blob 是否保存在我们创建的表中,或者 oracle 实际上将这些 blob 存储在不同的表中(如果是,那么 SYS_LOB 将是该表)?

Most of the tables (if not all) have a "blob" field in it. One of the table that stores the Logs of the user's action has now grown to 8 GB (about 5 million records).

And our DBA has seen that this schema is now eating space exponentially. We investigated a bit and found out that there is one of the tables with (SYS_LOB) which takes around 116GB of 140GB database.

Our DBA has told us that this table is related to the table that saves the logs of user actions (which is 8GB)

Does anyone know what this SYS_LOB tables does? Is the actual blob saved in the table we created OR oracle actually stores these blob this in a different table (if yes, then SYS_LOB would be that table)?

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

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

发布评论

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

评论(1

独木成林 2024-07-20 06:29:37

Oracle 数据库中没有表 SYS_LOB(至少,基本数据库安装中没有这样的表)。有一个视图 DBA_LOBS 显示有关以下信息的视图 DBA_LOBS数据库中的所有 LOB 列,但它实际上不存储任何 LOB 数据,仅存储元数据。数据库中的实际 LOB 段具有系统生成的名称,其形式为 SYS_LOBidentifier$$。

我的猜测是,您的 DBA 已识别出一个名为 SYS_LOBidentifier$$ 的段,该段消耗了 116 GB 的空间。假设这是正确的,您可以找出其中的哪一列。 LOB 列使用 DBA_LOBS 视图映射到的表,即

SELECT owner, table_name, column_name
  FROM dba_lobs
 WHERE segment_name = 'SYS_LOB<<identifier>>$'

There is no table SYS_LOB in the Oracle database (at least, there is no such table that is part of a basic database install. There is a view DBA_LOBS that displays information about all the LOB columns in the database, but it doesn't actually store any LOB data, just metadata. The actual LOB segments in the database have system-generated names that take the form SYS_LOBidentifier$$.

My guess is that your DBA has identified a segment named SYS_LOBidentifier$$ that is consuming 116 GB of space. Assuming that is correct, you can find out what column of what table that LOB column maps to using the DBA_LOBS view, i.e.

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