I'm using a InnoDB engine in MySql and I'm trying to figure out if it is possible to know the datetime of the last time a table was modified (be it it's data or it's structure).
Since it's InnoDB, I cannot use the column update_time
in information_schema
.Tables
as nothing is logged there. The performance of information_schema
with a lot of data is crappy anyway, so no big lost.
I thought about using a trigger that would insert the date in a self-made "metadata" table when a modification is made, but MySql doesn't support DDL triggers (Create, Alter and Drop statements), so this won't work either.
I'm kinda running out of ideas here, any tips?
Thanks
Edit: I forgot to specify that this datetime data will be retrieved (via a web service) by a Silverlight application I'm developing.
To give more background: I have a method on my web service that returns the structure of a database, with its data. Depending on the size, this could be a relatively long operation since I must get foreign key information in the information_schema
table. So I want to query the database only if the data or structure as changed.