How can I determine whether a particular column in a MySQL table is ever SELECTed or explicitly UPDATEd or INSERTed or referenced in a WHERE clause? It'd be nice if I could determine the db user who is using the column, too.
This is on MySQL 5.0, but I could move that to 5.6 or 5.7.
Background: I'm maintaining a legacy app with an AUTOINCREMENT field (
"id") that will foreseeably reach its maximum INT value before the app is retired.
I suspect, but do not know, that no one actually references this field in SQL at all. Ideally I'd "monitor" the column for a week or two and, if it appeared in no queries, I'd turn it into a BIGINT or drop it in favor of a natural key. If the column does appear in someones' queries, I'll need to track that person down and coordinate the change.