Organizational Research By

Surprising Reserch Topic

Experts Most Trusted Topic


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.

For example:


Which is better for email? varchar[100], char[100], 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
  VARCHAR.


Inno db has some diffrence that I don't know.
I read that from here.
    

asked Sep 7, 2015 by rajesh
0 votes
8 views



Related Hot Questions



Government Jobs Opening


...