# Switch to Innodb?

**URL:** <https://forums.percona.com/t/switch-to-innodb/498>\
**Category:** Other MySQL® Questions\
**Created:** [October 22, 2007, 1:05pm UTC](https://forums.percona.com/t/switch-to-innodb/498 "2007-10-22T13:05:09Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xxclixxx](https://avatars.discourse-cdn.com/v4/letter/x/67e7ee/32.png) [@xxclixxx](https://forums.percona.com/u/xxclixxx)\
**Post date:** [October 22, 2007, 1:05pm UTC](https://forums.percona.com/t/switch-to-innodb/498/1 "2007-10-22T13:05:09Z")

</div>

Hi All

I’ve never used Innodb so I’m unsure if switching to it will give me a benefit. So if you can shed any insight that would be great.

I don’t use foreign keys, I don’t care about ACID, I don’t do full text searches. I say this, because every site mentions if you use any of those 3 then you will use Innodb or MyISAM. Not much help after that.

My thought is that the row level locking will speed up things for me as the DB is heavily read/write to. The table is less than 1MB in size and uses indexes.

I have a two dual core processors and will soon have 4GB ram (2GB now). The slow query log pretty much only shows queries in two tables, both which match the above descriptions. One is 6,000 rows the other is 2,000.

Advice would be great.

---

<div class="post-metadata">

**Author:** ![sterin](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@sterin](https://forums.percona.com/u/sterin)\
**Post date:** [October 22, 2007, 2:42pm UTC](https://forums.percona.com/t/switch-to-innodb/498/2 "2007-10-22T14:42:14Z")

</div>

Compare the status variables table\_locks\_immediate with table\_locks\_waited.

The ratio:  
table\_locks\_immediate/table\_locks\_waited  
should be more than a couple of thousand.

If it’s not then you can benefit from changing to InnoDB.

---

<div class="post-metadata">

**Author:** ![xxclixxx](https://avatars.discourse-cdn.com/v4/letter/x/67e7ee/32.png) [@xxclixxx](https://forums.percona.com/u/xxclixxx)\
**Post date:** [October 22, 2007, 2:49pm UTC](https://forums.percona.com/t/switch-to-innodb/498/3 "2007-10-22T14:49:09Z")

</div>

Table\_locks\_immediate 8,852 k  
Table\_locks\_waited 126 k

The ratio is about 70 so I think that means I’m a candidate? I restarted MySQL fairly recently so I’ll watch it as it’s used longer. Thanks!

---

<div class="post-metadata">

**Author:** ![sterin](https://avatars.discourse-cdn.com/v4/letter/s/3ab097/32.png) [@sterin](https://forums.percona.com/u/sterin)\
**Post date:** [October 22, 2007, 5:16pm UTC](https://forums.percona.com/t/switch-to-innodb/498/4 "2007-10-22T17:16:03Z")

</div>

It’s not a extremely high figure but it is high enough for you to be a candidate.

Just remember to set this variable:  
innodb\_flush\_log\_at\_trx\_commit=0

Otherwise there is a very big chance that writes will be very slow for you.

Also remember to make sure that you set the variable  
innodb\_buffer\_pool\_size  
is set to value that preferably can store the entire DB or a max of 80% of available memory (but since you said that your DB is a few MB then this shouldn’t be a problem).

Read more about the parameters for InnoDB here
