2

I'm creating a service like FriendFeed. For the database, what's the best to have the tables with InnoDB or MyISAM?

  • There are a lot of selects and Inserts.
  • The table must be serchable, sortable when a user is inserting something.
  • At the end, it must have quite a lot of rows. (Depending on the table).
  • First, the database will be in one server.
  • I would like backup without locking the tables.

Thanks.

Francesc
  • 131
  • 2

3 Answers3

1

Only MyISAM supports mysql full-text search, whereas InnoDB supports foreign keys and such. Both sure are interesting for what you want to achieve.

If you can't decide, why not try a mix of both, combining their strengths by applying them selectively on tables where their respective qualities are needed ?

Berzemus
  • 1,192
  • 3
  • 11
  • 19
0

MyISAM won't allow you to backup without locking the tables on an unique server (without slave), and any insert will also locks the table... so you should choose InnoDB

Kedare
  • 1,786
  • 4
  • 20
  • 37
0

MyISAM is better for read-heavy tables and InnoDB is better for write-heavy table. If you have a mix of reads and writes, and if it's possible to design your writes to use only 1 key read, then MyISAM would be better.

Not sure about the back-up part however. Does copying the database files in the filesystem directly work for you?

blacklotus
  • 85
  • 6