In this post, I am sharing a DBA query to find the last updated time of the MySQL Table.
We can also check the row level last updated time by adding one extra column into a table like last_updated_datetime.
For reporting purposes, we are using this approach to check the row level last updated DateTime.
For reporting purposes, we are using this approach to check the row level last updated DateTime.
As a Database Administrator, we are also responsible for monitoring some of the important tables of our MySQL database.
We can use information_schema.tables to find the information of the MySQL tables.
Using information_schema.tables:
1
2
3
4
|
SELECT UPDATE_TIME
FROM information_schema.tables
WHERE TABLE_SCHEMA = 'Database_Name'
AND TABLE_NAME = 'Table_Name';
|
Using Status Command:
1
|
SHOW TABLE STATUS FROM Database_Name LIKE 'Table_Name';
|
0 comments:
Post a Comment