Jump to content


Photo

Determine Last Access Date for All Tables in a DB


  • Please log in to reply
2 replies to this topic

#1 roopurt18

roopurt18
  • Staff Alumni
  • Advanced Member
  • 3,749 posts
  • LocationCalifornia, southern

Posted 27 September 2006 - 07:00 PM

Is there a query that will return the last date all of the tables in a database were last accessed?  By accessed I mean data inserted, retrieved, or other such operations.

I ask because I've inherited a project that has a lot of tables that need to go.  I've done what I can to eliminate some of them but I want to make sure there's no application code still running queries on them.
PHP Forms : Part I | Part II

JavaScript: Singleton

http://www.rbredlau.com

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 27 September 2006 - 07:15 PM

At least for MyISAM tables, SHOW TABLE STATUS returns a column named update_time.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 roopurt18

roopurt18
  • Staff Alumni
  • Advanced Member
  • 3,749 posts
  • LocationCalifornia, southern

Posted 27 September 2006 - 10:12 PM

Thanks!
PHP Forms : Part I | Part II

JavaScript: Singleton

http://www.rbredlau.com




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users