0 and newer versions.
??? Use InnoDB for absolutely anything where data integrity or concurrency matter.
MyISAM, the default engine on most MySQL installations, does not support features
that most RDBMSs consider essential: foreign key constraints, row-level
locking, and transactions. In most business environments, these features are
non-negotiable. InnoDB is a journaled storage engine that is much more resilient
to failures. Rails does the right thing here and defaults to the InnoDB storage
engine when creating tables.
Unfortunately, InnoDB can be much slower than MyISAM, and the table sizes
are usually several times larger. MyISAM is usually faster when reads vastly outnumber
writes or vice versa, while InnoDB is generally faster when reads and
writes are balanced. It all comes down to the requirements of the specific application;
these are general rules. You should always benchmark with your real
data, and an accurate sample of queries and statements you will be issuing, in a
realistic environment.
There are a few exceptions to this guideline: MyISAM may be a better choice if you
need full-text indexing (which is only supported on MyISAM tables at this time). In
addition, if raw speed of reads or writes is the primary concern, MyISAM can
help. For example, a logging server for web analytics might use MyISAM tables:
you want to be able to dump logs into it as fast as possible, and reads are performed
far less often than writes.
Pages:
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156