I tried creating hash index on my table in memsql using
CREATE INDEX hashindex USING HASH ON table (column);
But i get the following error
ERROR 1710 (HY000): MemSQL does not support non-unique hash indexes.
Am i missing something ?
In order to make that statement work, you would need to add the UNIQUE
keyword between CREATE
and INDEX
. Ex:
CREATE UNIQUE INDEX hashindex USING HASH ON table (column);
If you are intentionally trying to have a non-unique hash index, however, it is not supported (as indicated in the error). If you are trying to have a unique index, then great! Adding the keyword will work for you. Just note that adding a unique index cannot be performed as an online operation.