Cloudant/Db2 - 如何确定是否读取了数据库表行?

发布于 2025-01-17 22:07:34 字数 266 浏览 0 评论 0原文

我有两个数据库 - CloudantIBM Db2。我在每个数据库中都有一个表,其中保存仅读取且从不更新的静态数据。这些是很久以前创建的,我不确定它们今天是否使用,所以我想进行清理。

我想确定是否仍在读取这些表或这些表中的行。

有没有办法在读取表的一行时记录读取时间戳(或者至少知道它是否只是像脏位一样被访问)?

或者

记录整个表的读取时间戳(如果访问其中的任何记录)?

I have two databases - Cloudant and IBM Db2. I have a table in each of these databases that hold static data that is only read from and never updated. These were created a long time ago and I'm not sure if they are used today so I wish to do a clean-up.

I want to determine if these tables or rows from these tables, are still being read from.

Is there a way to record the read timestamp (or at least know if it is simply accessed like a dirty bit) on a row of the table when it is read from?

OR

Record the read timestamp of the entire table (if any record from it is accessed)?

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

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

发布评论

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

评论(1

趴在窗边数星星i 2025-01-24 22:07:34

There is SYSCAT.TABLES.LASTUSED system catalog column in Db2 for DML statements on whole table.
There is no way to track each table row read access.

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