TONUMBER() type-conversion function performance issues

Hello,

Please do the following:

CREATE INDEX `user-session-idx` ON `default`(TO_NUMBER(userid), meta().id);

SELECT meta().id FROM default WHERE TO_NUMBER(userid)=123456789;

BTW, I would be surprised if MySQL treats strings and numbers as the same thing.

1 Like