mysql - Pass index to temporary table from regular table? -


I am creating a temporary table with a query like this:

  create temporary The table temp_table selects * regular_betables where 1  

but in some areas there is a whole index in regular_clock I try to do a full search on the new temporary table and I get an error that gives me "The complete index index that matches the column list can not be found < / Em> ". Therefore it is found that the index is not copying in the new table.

Thank you

You while preparing temporary table Temp_table, but it will create all indexes, so when you are in the temp_table select - Regular Tables , indexes can be rebuilt - which can be long . Or, you can create a table and add the pointer afterwards:

  make temporary table temp_table ALTER TABLE temp_table FULLTEXT INDEX (foo, bar, hawk) in temp_table Insert * from regular_tables  

but the index will be updated again on each entry.

Perhaps the most effective method will be to create a temporary table, insert all, then create an index:

  create temporary table temp_table optional table temp_table integer index (foo, Bar, baz) Add alternate table temp_table to select the temp_table in the disabled key * Regularly_able table temp_table ENAB LEKEYS  

Again, you have to wait for the index to be created, except that it is a part Will be the last alter With Tetment.


Comments