richswww Posted August 4, 2006 Share Posted August 4, 2006 (Possibly) dumb question:Let's say I have table foo with an index called myindex.If I do "RENAME TABLE foo TO bar" ...Will the "myindex" index be attached to the new table "bar", or should I drop the "myindex" index from the foo table and recreate it on the "bar" table after the rename?Thanks,Rich Stephens Quote Link to comment Share on other sites More sharing options...
fenway Posted August 4, 2006 Share Posted August 4, 2006 Renaming the table should have no effect on any indexes in said table, at least in MyISAM. Quote Link to comment Share on other sites More sharing options...
richswww Posted August 4, 2006 Author Share Posted August 4, 2006 So, by "no effect", you mean, the index should still be in place, so no need to drop and recreate them?Rich S. Quote Link to comment Share on other sites More sharing options...
fenway Posted August 4, 2006 Share Posted August 4, 2006 That's correct... at least for MyISAM, the table name is simple the file name of the underlying data and index files, so they don't even "know" about the change. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.