Let's create a new index on an existing table:
CREATE INDEX `IDX_some_index`
ON `some_table` (`a_column`, `another_column`);
Is this useful?
ANALYZE TABLE `some_table`;
Can anyone point to some documentation clarifying whether the CREATE INDEX process analyze the target table or not?
ANALYZE TABLEonce or twice per day, in that without it the query execution plans go terribly wrong (as in "why would it ever think this might be a good plan?"). With it, they are correct. – Shlomi Noach Jan 16 '14 at 05:43