Questions tagged [myisam]

MyISAM is the non-transactional storage engine for MySQL. It provides high-speed storage and retrieval, as well as fulltext searching capabilities. In addition, it is the default storage engine type for versions of MySQL prior to 5.5.

MyISAM is the default storage engine for the MySQL RDBMS since version 3.23 up to version 5.5.5. It provides a simple structure for a table using 3 files:

  1. .frm (Format File)
  2. .MYD (MyISAM Data)
  3. .MYI (MyISAM Index)

It is good to keep in mind that three(3) file handles are required to open one MyISAM table.

MyISAM tables are totally portable to other servers and other operating systems, provided the target server has the following chipset characteristics:

  • IEEE floating-point arithmetic
  • 2's-complements arithmetic

Different row format options provide for either of the following:

  • fixed rows
  • variable-length rows
  • full table compression.

SQL Commands such as ALTER TABLE tblname ROW_FORMAT=[Fixed|Dynamic] and the utility myisampack make row formats/compression that affect both the diskspace and speed of all SQL commands. MyISAM provides for fulltext indexing on TEXT fields. It provides neither transactional support nor referential integrity (via constrasints). However, MyISAM can prevent deadlocking in a low-read, low-write environment because each DML commands executed against a MyISAM table performs a full table lock on a first-come, first-serve basis.

The startup options for MyISAM can include

  • setting up buffers for caching index pages
  • bulking load buffering
  • table sizing options
  • concurrent insert (rapid appending to the table)

Since MyISAM tables can be rendered "crashed" (state where a file handle count >0 is stuck in the header of the MyISAM table) or corrupt if mysql crashes, command-line utilities are also provided for checksumming and table repair.

Using MyISAM tables can be very useful in read-heavy envinronments, low-write envinronments, and as read-only tables in replication slaves.

511 questions
278
votes
10 answers

What are the main differences between InnoDB and MyISAM?

What are the main differences between InnoDB and MyISAM?
ilhan
  • 3,009
  • 5
  • 19
  • 13
117
votes
5 answers

How to safely change MySQL innodb variable 'innodb_log_file_size'?

So I'm fairly new to tuning InnoDB. I'm slowly changing tables (where necessary) from MyIsam to InnoDB. I've got about 100MB in innodb, so I increased the innodb_buffer_pool_size variable to 128MB: mysql> show variables like…
Derek Downey
  • 23,190
  • 11
  • 77
  • 104
62
votes
4 answers

Which is faster, InnoDB or MyISAM?

How can MyISAM be "faster" than InnoDB if MyISAM needs to do disk reads for the data? InnoDB uses the buffer pool for indexes and data, and MyISAM just for the index?
jcho360
  • 1,979
  • 7
  • 23
  • 31
55
votes
3 answers

Why does InnoDB store all databases in one file?

It was convenient that MyISAM used to store each table in a corresponding file. InnoDB has made advancements in many aspects, but I wonder why InnoDB stores all databases in one file (ibdata1 by default). I understand that InnoDB will map the…
Googlebot
  • 4,377
  • 22
  • 64
  • 87
53
votes
6 answers

How to update 10 million+ rows in MySQL single table as Fast as possible?

Using MySQL 5.6 with InnoDB storage engine for most of the tables. InnoDB buffer pool size is 15 GB and Innodb DB + indexes are around 10 GB. Server has 32GB RAM and is running Cent OS 7 x64. I have one big table which contains around 10 millions +…
user16108
40
votes
4 answers

Why does MySQL not have hash indices on MyISAM or InnoDB?

I have an application that will only select on equality, and I figure I should use a hash index over a btree index. Much to my dismay, hash indices are not supported on MyISAM or InnoDB. What's up with that?
Alex
37
votes
5 answers

Why are simple SELECTs on InnoDB 100x slower than on MyISAM?

I have quite an annoying problem. I want to use INNODB as my main database engine and give up on MyISAM as I need the former for using galera-cluster for redundancy. I copied (description follows) the newbb_post table to a new table called…
jollyroger
  • 543
  • 1
  • 4
  • 9
32
votes
3 answers

How Does Table Partitioning Help?

I am having difficulty to grab the idea of pros and cons of table partitioning. I am about to start work on a project which would have 8 tables and one of them will be the main data table which will hold 180-260 million records. As it will be…
Rick James
  • 1,271
  • 3
  • 15
  • 19
31
votes
5 answers

How can I change the default storage engine in phpmyadmin?

I use InnoDB almost exclusively in my applications. However, if I'm not careful when setting up the table, I forget to change it and phpmyadmin sticks me with MyISAM. Is there a way to change the default storage engine?
Kaji
  • 937
  • 1
  • 9
  • 16
25
votes
3 answers

Is it common practice to mix InnoDB and MyISAM tables on same server?

I've got a single database of about 4.5GB running on a server with 8GB RAM. The vast majority of the tables are MyIsam (about 4.3GB), but I'm soon going to be converting some of them to InnoDB. (It's going to be a slow process, focusing on the most…
Derek Downey
  • 23,190
  • 11
  • 77
  • 104
24
votes
3 answers

Is the overhead of frequent query cache invalidation ever worth it?

I'm currently working on a MySQL database where we are seeing a large number of invalidations from the query cache, primarily because of the high number of INSERT, DELETE and UPDATE statements that are being executed on many of the tables. What I'm…
Craig Sefton
  • 395
  • 1
  • 3
  • 7
23
votes
6 answers

DELETE command not completing on 30,000,000 row table

I have inherited a database and am looking to clean and speed it up. I have a table that contains 30,000,000 rows, many of which are junk data inserted due to an error on behalf of our programmer. Before I add any new, more optimized indexes, I…
bafromca
  • 541
  • 1
  • 3
  • 9
22
votes
1 answer

Does mysqldump export indices, by default?

I played around a little with mysqldump and I was wondering, if it does export indices (FULLTEXT, INDEX,...) by default. I read up on it and I found this option: --disable-keys, -K which suggests, that it actually does export the indices. But I…
Aufwind
  • 377
  • 2
  • 3
  • 8
18
votes
2 answers

MySQL performance problem using indexed datetime column

I tried to solve the following problem for about one hour now and still didn't get any further with it. Okay, I have a table (MyISAM): +---------+-------------+------+-----+-------------------+----------------+ | Field | Type | Null | Key…
Robin Heller
  • 283
  • 1
  • 2
  • 7
16
votes
3 answers

Best of MyISAM and InnoDB

Is it possible to make InnoDB to use indexes same as MyISAM instead of clustered index due to limitation of RAM while getting benefit of its concurrency performance?
Rick James
  • 1,271
  • 3
  • 15
  • 19
1
2 3
34 35