Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: innodb and Myisam
PostPosted: Thu Mar 25, 2010 6:02 pm 
Offline
Senior Newbie

Joined: Fri Mar 05, 2010 3:51 pm
Posts: 6
Here's a dumb question- if you have two sites on one linode, each with it's own database, can you have one database as MyIsam and the other as InnodB?


Top
   
 Post subject:
PostPosted: Thu Mar 25, 2010 6:22 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
Absolutely. You can even mix MyISAM and InnoDB in the same database. You do need to pay attention to the server configuration, though, if you're going to use both.


Top
   
 Post subject:
PostPosted: Sun Apr 04, 2010 10:01 pm 
Offline
Senior Newbie

Joined: Tue Feb 02, 2010 7:30 am
Posts: 11
ICQ: 110035931
Website: http://www.olindata.com
AOL: T4HNLWalterH
Location: The world
Also, don't randomly choose one. As a rule of thumb in modern installations (MySQL 5.0+) choose innodb and configure it properly by default. MyISAM has advantages in specific situations, but InnoDB is much better in most.

In many web articles you'll find the reverse, where people tell you to use MyISAM because it's faster. This used to be the case, but nowadays it tends to be outdated. InnoDB is the default choice for tables because of it's more controlled caching, almost equal (and often even better) performance and much better concurrency.


Top
   
 Post subject:
PostPosted: Mon Apr 05, 2010 4:50 am 
Offline
Senior Member
User avatar

Joined: Tue Nov 24, 2009 1:59 pm
Posts: 362
Many places, including Linode Library, say "disable InnoDB on a VPS unless you need its features, it'll greatly reduce MySQL memory usage."
http://library.linode.com/troubleshooti ... y_settings

Is that too not true anymore?


Top
   
 Post subject:
PostPosted: Mon Apr 05, 2010 5:37 am 
Offline
Senior Newbie

Joined: Tue Feb 02, 2010 7:30 am
Posts: 11
ICQ: 110035931
Website: http://www.olindata.com
AOL: T4HNLWalterH
Location: The world
Innodb does have a slightly larger memory footprint. The question is: are you after low memory footprint or the additional features InnoDB provides?
Personally, I have a separate Linode for mysql, 2 for web and 1 for monitoring and various other tasks. I don't mind the slightly larger footprint of InnoDB. Especially if you take into account that MyISAM relies on OS filesystem cachign for it's performance. Under Innodb, this is kept within the inndob buffers as far as I know.


Top
   
 Post subject:
PostPosted: Mon Apr 05, 2010 1:00 pm 
Offline
Senior Member

Joined: Sun Feb 21, 2010 5:12 pm
Posts: 64
Another general rule is that MyISAM is faster if you're just reading from the database most of the time (running SELECTS). Whereas Innodb is better if you're writing to the database often (INSERT, UPDATE). MyISAM locks the entire table when it writes, whereas Innodb only locks a row.

As with all general rules, take it with a grain of salt.

Drupal is moving from MyISAM to InnoDB as the default in version 7.


Top
   
 Post subject:
PostPosted: Mon Apr 05, 2010 10:36 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Also if memory servers MyISAM supports full text search and innodb doesn't which means if you want to use the MATCH syntax you need MyISAM (I use myisam for my wiki for that reason)


Top
   
 Post subject:
PostPosted: Mon Apr 05, 2010 10:55 pm 
Offline
Senior Newbie

Joined: Tue Feb 02, 2010 7:30 am
Posts: 11
ICQ: 110035931
Website: http://www.olindata.com
AOL: T4HNLWalterH
Location: The world
That is correct, MyISAM is the only engine that supports fulltext. Then again, for any serious use of FULLTEXT I recommend using Sphinx (http://sphinxsearch.com).
It is magnitudes faster with a very low footprint both on CPU and memory side. It is insanely easy to set up (took me 4 hours the other day, and that was my first time using it/setting it up after having heard many many stories about it), and opens the door to all kinds of trickery the simple fulltext solution of MyISAM does not have (soundex, synonyms, etc).
If you use the OurDelta builds of MySQL, the SphinxSE storage engine is included. That makes it even easier to convert your application to work with sphinx, usually then just requiring a simple rewrite of queries.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group