[H-GEN] Mysql query row statistics
Arjen Lentz
arjen at mysql.com
Mon Aug 29 22:59:13 EDT 2005
Hi Anthony,
On Tue, 2005-08-23 at 11:34, Anthony Irwin wrote:
> I am looking at modifing an open source crm program
> that has a mysql database.
Which CRM app specifically?
> I am adding records then looking at the database to see what
> tables have been effected to get a better understanding of
> how the database stores the data.
>
> I noticed that in phpmyadmin there is a row statistics
> section that lists the last update of that table. I
> was wondering if there was a way to query the database
> on that last update of the tables for the entire
> database so I can quickly see what tables are modified
> when I do things in the program.
You could work that if you have a timestamp column that updates every
time you change. Alternatively, in MySQL 5.0 you could set up a trigger
to maintain audit logs.
You can also look at the binary log (with the mysqlbinlog tool) which
keeps track of any insert/update/delete and other statements that
actually the structure or content of your dbs. The binary log is used
for backups as well as for the async replication feature.
Hope this helps.
> Also am I heading down the right track for
> understanding the database layout or is there a better
> way? I haven't found any developer documentation for
> the project and there are no comments on any of the
> database table names.
It's always good if devs provide a bit of documentation, or at least
make things clear by design ;-)
On a related note, you may be interested to know that there's a MySQL
Users Group in Brisbane, our next meeting is on Tue Sep 6th, 7pm.
Sign up at http://mysql.meetup.com/84/
There's also a mailing list at http://lists.mysql.com/ug-brisbane
Regards,
Arjen.
--
Arjen Lentz, Community Relations Manager
MySQL AB, www.mysql.com
MySQL related blogs @ http://www.planetmysql.org/
More information about the General
mailing list