Jump to content

Convert yo innodb


Recommended Posts

Ok thanks :)

I got the two commands:

ALTER TABLE tbl_name ENGINE = InnoDB;

to go back

ALTER TABLE tbl_name ENGINE = MyISAM;


But a few users report that i must drop some indexes that i didn't understand and also they report some errors for a full text scan related :(

I am using sphinx.

Can anyone please give more details?


ALTER TABLE ibf_posts DROP index `post`



What this will do ?

I want to convert the 2 bigger tables:

ibf_posts
ibf_topic_markers


Thank you
Link to comment
Share on other sites

Why?

I will have any problems with this?

OK I solved this one, make sure you run a backup.



in mysql> ALTER TABLE ibf_posts DROP index `post`



Then you can run the innodb command



for topics



ALTER TABLE ibf_topics DROP index `title`



It took 22 minutes to drop Full Text index on the topics table, so be patient (and run it in screen)




Why i have to do this and what is doing in a better explanation?

Thank you
Link to comment
Share on other sites

You must drop the index from your table before you convert to innodb
Mysql Full search uses indexes from Myisam, since you are changing to innodb you can not use fullsearch, instead you must use sphinx
The errors those users were getting what because of this.

ALTER TABLE ibf_posts DROP index `post` -> will drop posts table index named post
I don't have any topic_markers ... so you must look for the FULLTEXT type index name and do the same.

To go back just create the indexes and convert the table to MyISAM: ALTER TABLE ibf_posts ADD FULLTEXT (post)

Link to comment
Share on other sites

  • 2 weeks later...

Ok i am ready to try the Innodb.

But if i want to go back to Myisam do i have to create first the indexes and then convert or first convert and then create the indexes?



Are those commands correct?

ALTER TABLE ibf_posts ENGINE = MyISAM;

and

ALTER TABLE ibf_posts ADD FULLTEXT (post) <- I think that the () will not work.

Can anyone please give the correct syntax and order to run the commands On mysql 5.1.55?

Thank you

Link to comment
Share on other sites

Ok so if i use this:

ALTER TABLE ibf_posts ADD FULLTEXT post;

I will get back the indexes that i had named post and fulltext ?

I am confused as it suppose that table had some info inside and this command seems to me to just create the table without that info that i had inside or it will recreate that info?

Link to comment
Share on other sites

Both of those commands will return your fulltext indexes to how they were before you removed them.

FULLTEXT is an index method, so using either command will return you to a fulltext index on your posts table with the index name being post.

Neither command recreates tables as you don't need to as you're not dropping (deleting) any, you're just changing the indexes.

you can delete and add indexes as many times as you want.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Upcoming Events

    No upcoming events found
×
×
  • Create New...