I have a table without a PRIMARY KEY, but a there is a UNIQUE KEY present should I set it to PRIMARY?

62 views Asked by At

I created a new table to store 20 Giga of data, I mistaken when I set indexes. In fact all my indexes are good, and one of them is a UNIQUE KEY between 3 columns. Normally this key should have been the PRIMARY KEY.

I estimated the cost in time of modifying the table. And I can't afford it, it takes one day.

My question is : Is this really useful to change my UNIQUE KEY to PRIMARY ?

Will I have better performance ?

For now I have to explain the index to use with some requests because the engine (TokuDB) choose the bad one and the performance drops significantly.

Personally, I really don't think it will change something, excepted the fact the table is poorly designed.

0

There are 0 answers