List:General Discussion« Previous MessageNext Message »
From:Jim Lyons Date:June 14 2010 9:14pm
Subject:Re: list rows with no recent updates
View as plain text  
Do you have a timestamp field on this table?

There's no way of seeing when a row was last updated unless you have a
timestamp field that automatically updates for any change (that's *any*
change - not necessarily the ones you want to keep track of) or creating
your own and updating them either on the update statement itself or in a
trigger.

You can pretty much tell when the last time an entire table was updated by
the date on the MYD or ibd file.

I'm assuming you don't want to constantly parse the binlog or general log.

On Mon, Jun 14, 2010 at 4:02 PM, MadTh <madan.feedback@stripped> wrote:

> Hi,
>
>
> I ran a update command on around 2700 rows inside a mysql database table
> which has around 3000 table rows to change the ( say)  price of each item (
> with unique ID. unique product code).
>
> like:
>
> mysql> UPDATE tbl_xyz  set listprice='9.45' where prod_id='3069' and
> prod_code='a0071';
> Query OK, 1 row affected (0.00 sec)
> Rows matched: 1  Changed: 1  Warnings: 0
>
>
>
>
> How can I list rows with no recent updates ( or the once where the above
> updates were not done)  or say with no updates in last 2 hours?
>
>
>
>
>
> Thank you.
>



-- 
Jim Lyons
Web developer / Database administrator
http://www.weblyons.com

Thread
list rows with no recent updatesMadTh14 Jun
  • RE: list rows with no recent updatesDaevid Vincent14 Jun
  • Re: list rows with no recent updatesJim Lyons14 Jun
  • Re: list rows with no recent updatesMadTh14 Jun
    • RE: list rows with no recent updatesDaevid Vincent15 Jun
  • Re: list rows with no recent updatesAdam Alkins16 Jun