Brandon Stout wrote:
Why not just use a timestamp field on each table? I don't think it violates any normalization rules, and you don't have to use a trigger:

Because performance would be poor on large tables. In order to find when a table was last modified, MySQL would have to scan every row in every table. I would also have to modify all my existing tables to include a timestamp column. The trigger-based solution has a constant time complexity (in terns of each table's row count) for timestamp lookups, while your solution appears to be linear (read: long-term problems down the road). The trigger-based solution also requires no change to the existing tables' schema. Seems superior to me. You?

--Dave

/*
PLUG: http://plug.org, #utah on irc.freenode.net
Unsubscribe: http://plug.org/mailman/options/plug
Don't fear the penguin.
*/

Reply via email to