Questions tagged [myisam]

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

997 questions
875
votes
25 answers

MyISAM versus InnoDB

I'm working on a projects which involves a lot of database writes, I'd say (70% inserts and 30% reads). This ratio would also include updates which I consider to be one read and one write. The reads can be dirty (e.g. I don't need 100% accurate…
user2013
  • 9,051
  • 4
  • 18
  • 8
423
votes
13 answers

How can I check MySQL engine type for a specific table?

My MySQL database contains several tables using different storage engines (specifically myisam and innodb). How can I find out which tables are using which engine?
oneself
  • 33,641
  • 29
  • 87
  • 118
261
votes
2 answers

What's the difference between MyISAM and InnoDB?

I understand that this question has been asked before, but most of the time it is asked in relation to a specific database or table. I cannot find an answer on this site that describes the two engines and their differences without respect to…
Scott
  • 10,906
  • 4
  • 24
  • 46
200
votes
8 answers

How to properly create composite primary keys - MYSQL

Here is a gross oversimplification of an intense setup I am working with. table_1 and table_2 both have auto-increment surrogate primary keys as the ID. info is a table that contains information about both table_1 and table_2. table_1 (id, field) …
filip
  • 2,756
  • 3
  • 19
  • 19
188
votes
14 answers

Is there a REAL performance difference between INT and VARCHAR primary keys?

Is there a measurable performance difference between using INT vs. VARCHAR as a primary key in MySQL? I'd like to use VARCHAR as the primary key for reference lists (think US States, Country Codes) and a coworker won't budge on the INT…
Jake McGraw
  • 52,590
  • 10
  • 46
  • 62
126
votes
8 answers

What is InnoDB and MyISAM in MySQL?

What is InnoDB and MyISAM in MySQL ?
user130561
  • 1,413
  • 3
  • 12
  • 8
102
votes
9 answers

How to test an SQL Update statement before running it?

In some cases, running an UPDATE statement in production can save the day. However a borked update can be worse than the initial problem. Short of using a test database, what are options to tell what an update statement will do before running it?
static_rtti
  • 46,349
  • 44
  • 123
  • 180
88
votes
3 answers

How do I know if a mysql table is using myISAM or InnoDB Engine?

In MySQL, there is no way to specify a storage engine for a certain database, only for single tables. However, you can specify a storage engine to be used during one session with: SET storage_engine=InnoDB; So you don't have to specify it for each…
kamal
  • 9,015
  • 28
  • 92
  • 148
55
votes
2 answers

Changing Table Engine in MySQL

I am using mysql and mysql workbench. I created 5 tables with innodb engine. I checked their engine and it was innodb before I insert data into them. I inserted data from 5 MyISAM tables and now my innodb tables are MyISAM. I can't change them. I…
AliBZ
  • 3,733
  • 10
  • 41
  • 64
49
votes
4 answers

mysql error 'TYPE=MyISAM'

Below query I'm executing in Ubuntu 12, MySQL 5.1 version and receiving error as mentioned: CREATE TABLE mantis_config_table ( config_id VARCHAR(64) NOT NULL, project_id INTEGER NOT NULL DEFAULT 0, user_id INTEGER NOT NULL DEFAULT 0, …
Aditya P Bhatt
  • 19,393
  • 17
  • 78
  • 102
43
votes
12 answers

MySql: MyISAM vs. Inno DB!

What are the differences between MyISAM and Inno DB types in MySql?
Arron S
  • 5,395
  • 6
  • 47
  • 57
40
votes
2 answers

Joining InnoDB tables with MyISAM tables

We have a set of tables which contain the meta level data like organizations, organization users, organization departments etc. All these table are going to be read heavy with very few write operations. Also, the table sizes would be quite small…
Pigol
  • 1,081
  • 2
  • 12
  • 17
37
votes
2 answers

Why doesn't MySQL's MyISAM engine support Foreign keys?

I am writing a web-app for my studies which includes fulltext search and foreign keys. I have read somewhere, MyISAM engine is suitable for fulltext searching, and InnoDB for foreign keys. In this situation what engine should I use for the best…
Mukilarasan
  • 697
  • 1
  • 7
  • 19
26
votes
2 answers

Why to use foreign keys with no action on delete or update

I have a question of interest: I have 2 tables in mysql with InnoDb. table tbl_a has a primary key, named a_id; table tbl_b has a primary b_id and a foreign key on tbl_a.a_id with "ON DELETE NO…
Preexo
  • 1,972
  • 5
  • 27
  • 37
26
votes
2 answers

MySQL FULLTEXT not working

I'm attempting to add searching support for my PHP web app using MySQL's FULLTEXT indexes. I created a test table (using the MyISAM type, with a single text field a) and entered some sample data. Now if I'm right the following query should return…
Ross
  • 43,016
  • 36
  • 114
  • 168
1
2 3
66 67