Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 926587
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:42:30+00:00 2026-05-15T19:42:30+00:00

I am creating a temp table with a query like this: CREATE TEMPORARY TABLE

  • 0

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

CREATE TEMPORARY TABLE temp_table
SELECT * FROM regular_table
WHERE 1

But regular_table has FULLTEXT index on some of the fields. I try to do a FULLTEXT search on the new temporary table and I get an error telling me “Can’t find FULLTEXT index matching the column list“. So obviusly the index is not copying over to the new table. Is there a way to force this?

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T19:42:30+00:00Added an answer on May 15, 2026 at 7:42 pm

    You could use CREATE TEMPORARY TABLE temp_table LIKE regular_table, but that will create all the indexes, so when you do INSERT INTO temp_table SELECT * FROM regular_table, the indexes will be rebuilt – which could be lengthy.

    Or, you can create the table and add the index afterwards:

    CREATE TEMPORARY TABLE temp_table
    ALTER TABLE temp_table ADD FULLTEXT INDEX (foo,bar,baz)
    INSERT INTO temp_table SELECT * FROM regular_table
    

    but the index will be, again, updated on every insert.

    Probably the most efficient way would be to create the temp table, insert all, build index afterwards:

    CREATE TEMPORARY TABLE temp_table
    ALTER TABLE temp_table ADD FULLTEXT INDEX (foo,bar,baz)
    ALTER TABLE temp_table DISABLE KEYS
    INSERT INTO temp_table SELECT * FROM regular_table
    ALTER TABLE temp_table ENABLE KEYS
    

    Again, you will have to wait for the index to build, except it will happen in one chunk, with the last ALTER statement.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a temp table from a query that generates data from SQL
I am creating a table like create table tablename as select * for table2
I have a query that I execute with CREATE TEMPORARY TABLE AS SELECT because
I have a temp table set up like this: Type Rate TotalCost ---- ----
I have a temp table I am creating a query off of in the
Trying to migrate from MSSQL to MySQL. This Stored Proc is creating a temp
I'm creating a temp table and I want to fill the column from 0-9999
I'm creating a temp table that's the result of a stored procedure's result set.
im using linux with gedit which has the wonderful habit of creating a temp
I was just wondering which approach is better. Creating a complex select query with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.