Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: Get timestamp of last modify of MySQL table

by Anonymous Monk
on Mar 05, 2022 at 21:59 UTC ( [id://11141866]=note: print w/replies, xml ) Need Help??


in reply to Re: Get timestamp of last modify of MySQL table
in thread Get timestamp of last modify of MySQL table

Thank you. This brought me to the solution:

my $sql = "SELECT UPDATE_TIME FROM information_schema.tables WHERE TAB +LE_NAME = 'name_of_table'";

Replies are listed 'Best First'.
Re^3: Get timestamp of last modify of MySQL table
by perlfan (Vicar) on Mar 10, 2022 at 15:40 UTC
    Beware,

    > Timestamps are not persisted when the server is restarted or when the table is evicted from the InnoDB data dictionary cache.

    And given that file time stamps (on the system) are unreliable and fragile, I suggest if there is a "time" you want to track reliably/correctly and precision is not a priority, using time stamp fields in your tables is going to give you the best and most reliable result.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11141866]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-03-29 14:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found