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 Link to comment https://forums.phpfreaks.com/topic/16547-rename-table-and-indexes/ 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. Link to comment https://forums.phpfreaks.com/topic/16547-rename-table-and-indexes/#findComment-69209 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. Link to comment https://forums.phpfreaks.com/topic/16547-rename-table-and-indexes/#findComment-69326 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. Link to comment https://forums.phpfreaks.com/topic/16547-rename-table-and-indexes/#findComment-69450 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.