Search code examples
mysqlinnodbmyisam

InnoDB or MyISAM?


I have two tables: Users and Friendships. The actions I have in the website are:

  • Register
  • Log in
  • Select friends/people from users table
  • Add people as friends

There are a little more actions but in general i wanted to know :

The Question:

Should I use InnoDB or MyISAM for the tables ? ( Or InnoDB for one and MyISAM for the other ? )


Solution

  • Always use InnoDB unless you specifically want to include a FULLTEXT index on a particular table. Only InnoDB enforces foreign keys, and the more referential integrity you can build into the database the better off everyone's going to be.