Hello! Pete French wrote:
>If I have amast/salve pair where the slave is replicating from >the master then do the table types have to be the same ? > >Specifically can I have a myisam table on the master and replicate to >a bdb table on the slave ? > >The reasoning behind this is to try and find a *fast* was to convert >a MYISAM table to a BDB table having the database down for the >minimum amount of time. Idea so far is this: > > How about this: CREATE TABLE new_table (<all like your current one, besides indexes>) TYPE=BDB; INSERT INTO new_table SELECT * FROM old_table; CREATE INDEX ... ON new_table;... ALTER TABLE new_table ADD PRIMARY KEY (...);... RENAME old_table TO old_table_bak; RENAME new_table TO old_table; That should cause a downtime of less than a second... last but not least you need insert all rows that have been created between the INSERT and the last RENAME. >on current database machine do a ''mysqldump' and then enable logging. >Load onto new database machine with table types set of BDB. >Make new db machine replicate from old until it has caught up with the new >data which was inserted into the master whilst the load was happening. >When both are in sync then take them down and point allupdating >clients to the new database machine. > >Any comments ? Converting the tables "in situ" is painfully slow - a >couple of days I suspect. > > Greetings Ralf > > -- Ralf Narozny SPLENDID Internet GmbH & Co KG Skandinaviendamm 212, 24109 Kiel, Germany fon: +49 431 660 97 0, fax: +49 431 660 97 20 mailto:[EMAIL PROTECTED], http://www.splendid.de --------------------------------------------------------------------- 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