了解oracle中的Lob段(SYS_LOB)?
大多数表(如果不是全部)都有一个“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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Oracle 数据库中没有表
SYS_LOB
(至少,基本数据库安装中没有这样的表)。有一个视图DBA_LOBS
显示有关以下信息的视图DBA_LOBS
数据库中的所有 LOB 列,但它实际上不存储任何 LOB 数据,仅存储元数据。数据库中的实际 LOB 段具有系统生成的名称,其形式为 SYS_LOBidentifier$$。我的猜测是,您的 DBA 已识别出一个名为
SYS_LOB
identifier$$ 的段,该段消耗了 116 GB 的空间。假设这是正确的,您可以找出其中的哪一列。 LOB 列使用DBA_LOBS
视图映射到的表,即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 viewDBA_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_LOB
identifier$$ 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 theDBA_LOBS
view, i.e.