Ask a Question
Advertise on boostr.in
how to choose optimized datatypes for columns innodb specific using -'mysql,database,database-design,innodb'
how to choose optimized datatypes for columns innodb specific ¬†using -'mysql,database,database-design,innodb'
I'm learning about the usage of datatypes for databases.
Which is better for email? varchar, char, or tinyint (joking)
Which is better for username? should I use int, bigint, or varchar?
Explain. Some of my friends say that if we use int, bigint, or another numeric datatype it will be better (facebook does it). Like u=123400023 refers to user 123400023, rather then user=thenameoftheuser. Since numbers take less time to fetch.
Which is better for phone numbers? Posts (like in blogs or announcments)? Or maybe dates (I use datetime for that)? maybe some have make research that would like to share.
Product price (I use decimal(11,2), don't know about you guys)?
Or anything else that you have in mind, like, "I use serial datatype for blablabla".
Why do I mention innodb specifically?
¬†¬†Unless you are using the InnoDB table
¬†¬†types (see Chapter 11, "Advanced
¬†¬†MySQL," for more information), CHAR
¬†¬†columns are faster to access than
Inno db has some diffrence that I don't know.
I read that from here.
Sep 7, 2015
to add a comment.
Your name to display (optional):
Email me at this address if my answer is selected or commented on:
Email me if my answer is selected or commented on
Privacy: Your email address will only be used for sending these notifications.
To avoid this verification in future, please