> -----Original Message-----
> From: Paul DuBois [mailto:[EMAIL PROTECTED]]
> Sent: jueves, 10 de mayo de 2001 6: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
> 

Yep, and that stalling is (IMHO) one of the primary problems with MyISAM &
ISAM tables.
Ofcourse it's possible to design oneself out of these problems, but the only
real good solution is locking on row level rather than the whole table.
InnoDB tables has row level locking AFAIR.
My databases have around 52 insert requests per second, so even a small
alter build up a huge amout of pending requests.

Regarding the time spent. 4 days seems to be alot to me..... what kind of
hardware is it running on ?

I have MySQL databases with more than 100 million rows and they take only
about 4 hours to alter on a 700 MHz, 8 MB cache, EV67 Alpha (with lots of
RAM).
Even though I run on SMP machines with lots of CPUs, altering is a
singlethreaded task (or so it seems), so I don't have any benefit out of it.

--  
Un saludo / Venlig hilsen / Regards

Jesper Frank Nemholt
Unix System Manager
Compaq Computer Corporation

Phone : +34 699 419 171
E-Mail: [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