Table Types-MySQL

MyISAM is the default table type in MySQL Version 3.23. It's based on the ISAM code and
has a lot of useful extensions.

The index is stored in a le with the .MYI (MYIndex) extension, and the data is stored
in a le with the .MYD (MYData) extension. You can check/repair MyISAM tables with the
myisamchk utility.

The following is new in MyISAM:
 If mysqld is started with --myisam-recover, MyISAM tables will automaticly be repaired on open if the table wasn't closed properly.

 You can INSERT new rows in a table without deleted rows, while other threads are
reading from the table.

 Support for big les 63-bit on lesystems/operating systems that support big les.
 All data is stored with the low byte rst. This makes the data machine and OS
independent. The only requirement is that the machine uses two's-complement signed
integers (as every machine for the last 20 years has) and IEEE

oating-point format
also totally dominant among mainstream machines. The only area of machines that
may not support binary compatibility are embedded systems because they sometimes
have peculiar processors.
There is no big speed penalty in storing data low byte rst; The bytes in a table row
is normally unaligned and it doesn't take that much more power to read an unaligned
byte in order than in reverse order. The actual fetch-column-value code is also not
time critical compared to other code.

 All number keys are stored with high byte rst to give better index compression.
 Internal handling of one AUTO_INCREMENT column. MyISAM will automatically update
this on INSERT/UPDATE. The AUTO_INCREMENT value can be reset with myisamchk.
This will make AUTO_INCREMENT columns faster (at least 10 %) and old numbers will
not be reused as with the old ISAM. Note that when an AUTO_INCREMENT is de ned on
the end of a multi-part-key the old behavior is still present.
 When inserted in sorted order (as when you are using an AUTO_INCREMENT column) the
key tree will be split so that the high node only contains one key. This will improve
the space utilization in the key tree.
 BLOB and TEXT columns can be indexed.
 NULL values are allowed in indexed columns. This takes 0-1 bytes/key.
 Maximum key length is now 500 bytes by default. In cases of keys longer than 250
bytes, a bigger key block size than the default of 1024 bytes is used for this key.
 Maximum number of keys/table enlarged to 32 as default. This can be enlarged to 64
without having to recompile myisamchk.

 There is a ag in the MyISAM le that indicates whether or not the table was closed
correctly. This will soon be used for automatic repair in the MySQL server.
 myisamchk will mark tables as checked if one runs it with --update-state. myisamchk
--fast will only check those tables that don't have this mark.

 myisamchk -a stores statistics for key parts (and not only for whole keys as in ISAM).
 Dynamic size rows will now be much less fragmented when mixing deletes with updates
and inserts. This is done by automatically combining adjacent deleted blocks and by
extending blocks if the next block is deleted.

 myisampack can pack BLOB and VARCHAR columns.
Related Posts:
  • MySQL Server Performance To make things  easier for administrators. Minimal memory, relatively infrequent MySQL usage: my-small.cnf Minimal memory combined with reliance on MySQL, or larger memory for a multipurpose system: my-medium.… Read More
  • Web-Based MySQL Administration Web-Based MySQL Administration At http://phpwizard.net/phpMyAdmin you will find a PHP Web application that can help you manage MySQL. It enables you to manage a MySQL database using a browser and makes administrative work… Read More
  • Combined Queries-UNION Mosy SQL queries contain just one SELECT statement that can return data from one table, or several tables using a join. The technique of combining two or more independent queries into a single data set is usually known a… Read More
  • Maximum Performance from MySQL Optimization is a complicated task because it ultimately requires understanding of the whole system. While it may be possible to do some local optimizations with small knowledge of your system/application, the more optimal y… Read More
  • SQL inherently SQL, or Structured Query Language, is not really a language. It does not follow all the rules of the typical computer programming language. There are no constructs in SQL to allow decision branches. You can't go to a sp… Read More
  • Why NoSQL? Application requirements have fundamentally changed, and traditional RDBMS technology has failed to keep pace. As a result, the use of NoSQL technology is rising rapidly. Massive change is underway, disrupting the databas… Read More
  • Data Control Language (DCL) statements ? Data Control Language (DCL) statements  Allow you to change the permissions on database structures. There are two DCL statements: GRANT  Allows you to give another user access to your database st… Read More
  • Data Definition Language (DDL) statements? Data Definition Language (DDL) statements  Allow you to define the data structures, such as tables, that make up a database. There are five basic types of DDL statements: CREATE  Allows you to cr… Read More
  • LOAD DATA INFILE statement MySQL LOAD DATA INFILE provides an alternative to INSERT for adding new records to a table. With INSERT, you specify data values directly in the INSERT statement. LOAD DATA INFILE reads the values from a separate datafile.The… Read More
  • What Is a Relational Database? The basic concepts of a relational database are fairly easy to understand. A relational database is a collection of related information that has been organized into structures known as tables. Each table contains rows th… Read More
  • Query Strings Query string data is very easy for the user to alter, because it ’ s visible and editable within the browser ’ s address bar. Therefore, query strings should be used only in situations where sending incorrect data won ’ t co… Read More
  • Linking Affects the Speed of MySQL Most of the following tests are done on Linux with the MySQL benchmarks, but they should give some indication for other operating systems and workloads. You get the fastest executable when you link with -static. On Linux, yo… Read More
  • Data Manipulation Language (DML) statements ? Data Manipulation Language (DML) statements  Allow you to modify the contents of tables. There are three DML statements: INSERT  Allows you to add rows to a table. UPDATE  Allows yo… Read More
  • MySQL Subqueries? You can use the result of a query like you use a list of values with the IN operator to filter a query based on the result of another query. The subquery appears in parentheses after the IN keyword. The following query f… Read More
  • Conditional Functions mysql The IF() Function The IF() function provides a way to return a value based on a condition within a query. The first argument is a condition that is evaluated for each row of the query. The value in the second is return… Read More