That's the use case I see over and over for the atomic table swap you get
with RENAME TABLE.

Jeremy

On Wed, Nov 25, 2009 at 12:29 PM, Brian Moon <[email protected]> wrote:

> hrm....one thing about RENAME TABLE is that you can rename several
>> tables at once.  (I believe it's even atomic).  With ALTER TABLE, at
>> least in the current MySQL incarnation, you can only change one table
>> per statement.
>>
>
> This is super handy for swapping out an active table with a clean version.
>  For example, we log to article_clicks, but roll it off each day to
> article_clicks_YYYYMMDD and create a new clean article_clicks. We use RENAME
> TABLE for this to make it all atomic and not get and errors.  I would hate
> to lose that feature in Drizzle.
>
> Brian.
>
>
> _______________________________________________
> Mailing list: 
> https://launchpad.net/~drizzle-discuss<https://launchpad.net/%7Edrizzle-discuss>
> Post to     : [email protected]
> Unsubscribe : 
> https://launchpad.net/~drizzle-discuss<https://launchpad.net/%7Edrizzle-discuss>
> More help   : https://help.launchpad.net/ListHelp
>
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to