Solved

Converting tables from MyISAM to InnoDB

Posted on 2006-06-20
4
498 Views
Last Modified: 2012-06-22
Hi,
  I've got a table with 110k records. Reads/Writes are a little slow. I'm using MyISAM for the table. Considering the size and speed problems, will making the table InnoDB improve things?
  I'm using MySQL 5.0.22.  I also read that MySQL cautions this conversion as being unsupported.

(1) Anyone with any thoughts/experience on doing this?
(2) Anyone with any thoughts on my specific situation?

Thanks.
0
Comment
Question by:bigtwig
  • 2
4 Comments
 
LVL 7

Assisted Solution

by:db2inst1
db2inst1 earned 40 total points
ID: 16948617

I didn't know that was not supported. I did try changing the storage engine using alter table & once by importing the mysqldump after the editing the storage engine type in the dump file.

Alter table statement was slower. For almost double the size of your table.
0
 
LVL 2

Author Comment

by:bigtwig
ID: 16950512
http://dev.mysql.com/doc/refman/5.0/en/innodb-restrictions.html says it is an unsupported operation.

So you've (db2inst1) have done this twice before or you were just testing it?
0
 
LVL 22

Accepted Solution

by:
NovaDenizen earned 460 total points
ID: 16952785
That is just talking about the mysql.* database, which is the confusingly named database schema that holds all the user permission, table permission passwords, etc.  It is perfectly fine to change the engine on your own database tables.

In other words,
ALTER TABLE mysql.user ENGINE=InnoDB;   <---- DANGER DANGER!  unsupported!

ALTER TABLE XYZ_db.xyztable ENGINE=InnoDB;  <---- perfectly fine.
0
 
LVL 22

Assisted Solution

by:NovaDenizen
NovaDenizen earned 460 total points
ID: 16952817
This is completely separate from the question of whether or not changing the engine will actually speed things up for you.  It depends on how well indexed your queries are, what kind of data you have, and what kind of updates are going on.  If it slows things down, you could always alter it back to MyISAM.

Also, you should keep in mind that your ibdata file will get really big when you change your table to innodb, since all the data will go into the ibdata file.  If you change it back to MyISAM, the innodb file will still stay at the 'high-water mark' for that amount of data.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword This is an old article.  Instead of using the MySQL extension that was used in the original code examples, please choose one of the currently supported database extensions instead.  More information is available here: MySQLi / PDO (http://…
Foreword This article was written many years ago, in the days when PHP supported the MySQL extension (http://php.net/manual/en/function.mysql-connect.php).  Today (http://php.net/manual/en/migration70.removed-exts-sapis.php) you would not use MySQL…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question