mysql> SHOW VARIABLES LIKE ‘have_blackhole_engine’;
Tag Archives: Storage Engine
BLACKHOLE storage engine
When we create BLACKHOLE table the server will create file with name starts with table name with extension .frm . No other tables will be generated as it stores nothing .
It supports all types of indexes .
Though nothing is stored , the query statements get stored if binary logs are enabled .
It does not support AUTO INCREMENT
CSV Storage Engine
When you create an ARCHIVE table, the server creates a table format file in the database directory. The file begins with the table name and has an .frm extension. The storage engine creates other files, all having names beginning with the table name. The data and metadata files have extensions of .ARZ and .ARM, respectively. An .ARN file may appear during optimization operations.
The ARCHIVE engine supports INSERT and SELECT, but not DELETE, REPLACE, or UPDATE. It does support ORDER BY operations, BLOB columns
ARCHIVE Storage Engine
When you create an ARCHIVE table, the server creates a table format file in the database directory. The file begins with the table name and has an .frm extension. The storage engine creates other files, all having names beginning with the table name. The data and metadata files have extensions of .ARZ and .ARM, respectively. An .ARN file may appear during optimization operations.
The ARCHIVE engine supports INSERT and SELECT, but not DELETE, REPLACE, or UPDATE. It does support ORDER BY operations, BLOB columns
Check ARCHIVE storage engine is available
Run the following command
mysql> SHOW VARIABLES LIKE 'have_archive';
FEDERATED Storage Engine
EXAMPLE Storage Engine
When you create an EXAMPLE table, the server creates a table format file in the database directory. The file begins with the table name and has an .frm extension. No other files are created. No data can be stored into the table. Retrievals return an empty result.
BDB Storage Engine
Note that as of MySQL 5.1, its not supported .
MEMORY Storage Engine
As indicated by the engine name, MEMORY tables are stored in memory. They use hash indexes by default, which makes them very fast, and very useful for creating temporary tables. However, when the server shuts down, all rows stored in MEMORY tables are lost. The tables themselves continue to exist because their definitions are stored in .frm files on disk, but they are empty when the server restarts.
MEMORY tables can have up to 64 indexes per table
MEMORY tables can have up to 16 columns per index
MEMORY tables can have maximum key length of 3072 bytes.
Space for MEMORY tables is allocated in small blocks. Tables use 100% dynamic hashing for inserts.
The MEMORY storage engine supports both HASH and BTREE indexes. You can specify one or the other for a given index by adding a USING clause
MEMORY tables can have nonunique keys.
Columns that are indexed can contain NULL values.
MEMORY tables use a fixed-length row-storage format. Variable-length types such as VARCHAR are stored using a fixed length.
MEMORY tables cannot contain BLOB or TEXT columns.
MEMORY includes support for AUTO_INCREMENT columns.
The server needs sufficient memory to maintain all MEMORY tables that are in use at the same time.
MERGE Storage Engine
Use of DROP TABLE with a MERGE table drops only the MERGE specification. The underlying tables are not affected.
We can create MERGE table using the option UNION={list-of-tables} that indicates which MyISAM tables to use. You can optionally specify an INSERT_METHOD option to control how inserts into the MERGE table take place. Use a value of FIRST or LAST to cause inserts to be made in the first or last underlying table, respectively. If you specify no INSERT_METHOD option or if you specify it with a value of NO, inserts into the MERGE table are not permitted and attempts to do so result in an error.
Example
CREATE TABLE blog ( id INT NOT NULL AUTO_INCREMENT, comment CHAR(50), INDEX(id)) ENGINE=MERGE UNION=(blog1,blog2) INSERT_METHOD=LAST;
Here blog1,blog2 should have identical column and index information .