We have a large database with two tables of around 31.5 million rows each.
When I did an alter table, again to modify a column, it took 17 hours.

I noticed that the table was still readable and writes were blocked.
However, during the ALTER table MySQL repaired the table using a keysort.
This seemed to lock the table for reading as well.

As you can't know before hand that MySQL will try a repair, don't count on
the fact that the table will be available.

Robin

-----Original Message-----
From: Paul DuBois [mailto:[EMAIL PROTECTED]]
Sent: 10 May 2001 05:00
To: Christian Jaeger; David J. Potter; [EMAIL PROTECTED]
Subject: Re: Having success with 20 million rows


At 11:00 PM +0200 5/9/01, Christian Jaeger wrote:
>Was the table inaccessible during these 4 days? Or is mysql able to 
>still write to the table while it's being altered?

Those are not mutually exclusive possibilities. :-)

According to the manual, reads can be done on the original table while
the new table is being constructed. Updates are stalled and then applied
to the new table after the alteration.

http://www.mysql.com/doc/A/L/ALTER_TABLE.html

>
>Christian.
>
>At 12:08 Uhr -0700 9.5.2001, David J. Potter wrote:
>>occur very fast.  We use both Windows and Linux.  Adding a column is the
>>only action that is slow (it took 4 days once to add a column)
>
>---------------------------------------------------------------------
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail <[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php


-- 
Paul DuBois, [EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to