MySQL: Is a primary key created automatically when creating a temporary table?
user444 Published in July 21, 2018, 1:39 pm
I have a query that is taking quite a long time (11 million or so observations), and three joins (I can't stop it to check). One of the joins is with a temporary table.
When I create a temporary table using data from a table that has a primary key within it, will the new table carry over the indexing, or do I have to explicitly create an index in the new temporary table (with the primary key from the parent table)?