List:General Discussion« Previous MessageNext Message »
From:Ananda Kumar Date:March 30 2007 12:39pm
Subject:Re: a 'safe' way to move data?
View as plain text  
Hi Christian,
Before delete teh data from old_table, just have a backup.
Create table new_table_bck select * from old_table limit 50000;
But i feel, instead of using limit, try to get data based on some date or
other condition, so that you are sure that same data gets insert and also
deleted from old table

regards
anandkl


On 3/30/07, Ian P. Christian <pookey@stripped> wrote:
>
> I'm trying to move data between 2 tables.
>
> > INSERT INTO new_table SELECT * FROM old_table LIMIT 50000;
> > DELETE FROM old_table LIMIT 50000;
>
> This is the only process that deletes data from old_table, can I be
> *sure* that the limit in these 2 queries will address the same data set?
>
> (if I don't limit to small numbers in the LIMIT, I/O gets too high, so
> I'm moving data slowly in batches)
>
> Thanks,
>
> --
> Ian P. Christian ~ http://pookey.co.uk
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
>
>

Thread
a 'safe' way to move data?Ian P. Christian30 Mar
  • Re: a 'safe' way to move data?Ananda Kumar30 Mar
  • Re: a 'safe' way to move data?Brent Baisley30 Mar
    • Re: a 'safe' way to move data?Ian P. Christian30 Mar
      • Re: a 'safe' way to move data?Dan Nelson30 Mar
        • Re: a 'safe' way to move data?Ian P. Christian30 Mar