Let's assume that I have table data
:
CREATE TABLE `test`.`data` (
`row_id` INT NOT NULL ,
`data_id` INT NOT NULL ,
PRIMARY KEY (`row_id`) );
Now, let's assume that data_id has unique values. Is there any difference(space, performance, memory) between having B-Tree index on data_id
and UNIQUE index on it? (besides the case when InnoDB is used as storage engine and UNIQUE index can be used as clustering key so row_id is uneccesary)