php - Mysql PK and FK char(36) vs int(10) -
i have read mysql can handle indexes , searches better if tables keys integers rather char(36) uuid's.
is worth converting int(10)?
note: use 1 server , have have plans use multiple databases concurrently therefore removing 1 of big reasons using uuid. our tables innodb if makes difference.
thanks in advance.
usually rdbms can handle integer keys pk more efficient, other datatypes. reason how build index column, yes: long dont require string (or other typed) keys, should use integers.
however: char(36) , int(10) far away being equal, because int(10) much smaller, char(36). dont know, if require many different keys, should keep in mind.
update, complete last paragraph: int(10)
32-bit, char(36)
36 - ^byte^ (= 288-bit). not mean, int
consumes less space, means, char(36)
has 4 times more different keys.
Comments
Post a Comment