如何获取 DB2 MQT 上次刷新时间 [英] How to get DB2 MQT last refresh time

查看:15
本文介绍了如何获取 DB2 MQT 上次刷新时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于 z/OS 上的 DB2 物化查询表,如何检索上次刷新时间?

文档说明 DB2 在 REFRESH 期间执行的操作之一是使用刷新时间戳填充目录.

<块引用>

  1. 使用刷新时间戳和基数更新 DB2 目录具体化查询表

哪些目录表和列包含此信息?

我一直在寻找这个,以便将时间戳与另一个资源进行比较,看看它自上次刷新以来是否发生了变化.如果自上次刷新后其他资源已更改,则必须刷新 MQT.

解决方案

可以在SYSIBM.SYSVIEWS表的REFRESH_TIME列中找到上次刷新的时间戳p>

您可以使用以下 SQL 检索特定表的上次刷新时间戳:

SELECT REFRESH_TIME来自 SYSIBM.SYSVIEWS名字在哪里=?和创造者 = ?AND 类型 = 'M'

请参阅 关于 SYSIBM.SYSVIEWS 表的 IBM 文档 了解更多信息.

For a DB2 on z/OS Materialized Query Table, how can you retrieve the last refresh time?

The documentation states that one of the actions that DB2 takes during a REFRESH is to populate the catalog with a refresh timestamp.

  1. Updates the DB2 catalog with a refresh timestamp and the cardinality of the materialized query table

What catalog table and column holds this information?

I was looking for this in order to compare the time stamp with another resource to see if it has changed since the last refresh. If the other resource has changed since the last refresh, the MQT must be refreshed.

解决方案

You can find the last refresh timestamp in the REFRESH_TIME column on the table SYSIBM.SYSVIEWS

You could use the following SQL to retrieve the last refresh timestamp for a specific table:

SELECT REFRESH_TIME
FROM SYSIBM.SYSVIEWS
WHERE NAME = ?
AND CREATOR = ?
AND TYPE = 'M'

See the IBM documentation for the SYSIBM.SYSVIEWS table for more information.

这篇关于如何获取 DB2 MQT 上次刷新时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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