|
|
Archives of the TeradataForum
Message Posted: Fri, 02 Jul 2010 @ 09:30:00 GMT
Subj: | | How often a table is updated? |
|
From: | | Anomy Anom |
<-- Anonymously Posted: Friday, July 02, 2010 02:47 -->
Hi ,
Does anybody have a script to work out how often a table is updated via a Insert/Delete/Update, Mload or Fastload.
This is what we've got so far. Has anybody got anything better?
SELECT a.logdate, a.username, a.userid, a.starttime, a.logonsource, a.statementtype, a.querytext
FROM sys_reporting_views.dbqlogtbl_usr_v a
WHERE querytext LIKE ANY ('%INS%INTO DWH_CST_PRD.CHARGE',
'%DEL%FROM DWH_CST_PRD.CHARGE',
'%UPD%DWH_CST_PRD.CHARGE',
'%INS%INTO%CHARGE',
'%DEL%FROM%CHARGE',
'%UPD%CHARGE',
'BEGIN%DWH_CST_PRD.CHARGE%',
'EXEC%DWH_CST_PRD.CHARGE%'
)
;
Many thanks
| |