Table last Updated?
Posted in 2000
Topics: Server Administration
Hi everyone, Can anyone let me know how I can determine when a table was last updated with data? I use DBACCESS to look at my tables and views or an SQL statement to check what is in them. Sometimes I would just like to see if a table is being updated and just need the time and date information. Thanks Shane
Shane, I too would be interested in knowing if there are any internal statistics maintained by the Informix Engine for a tblspace that would provide this info. Just recently I had a need to know when inserts were occurring in a particular table. Since this table contains timecards submitted by employees, I wanted to get a sense of usage, and I wanted to put the data in a spreadsheet so I could present management with a nifty looking graph. If the designers of the table had included a column for insert datetime, I could have used that information. So, I created (a) a table called h_timecard that has a single datetime column, and (b) a trigger that inserts the current datetime into h_timecard whenever an insert occurs in the timecard table. I wasn't concerned with performance issues (inserting a datetime into h_timecard does take up resources) since the transaction rate for these inserts is about two a minute on the average, and 20 or so during peak time. This works great. In another application I was fortunate enough to have dedicated a single dbspace to a table. In that case the statistics for the table are the same as the dbspace and therefore i/o information can be obtained from engine statistics via the Informix administrative command. Vic Shane Irwin wrote: > Hi everyone, > > Can anyone let me know how I can determine when a table was last updated > with data? > > I use DBACCESS to look at my tables and views or an SQL statement to check > what is in them. > > Sometimes I would just like to see if a table is being updated and just need > the time and date information. > > Thanks > > Shane