Kathiravan's

Tuesday, December 2, 2008 Written By: Kathiravan Manoharan

Blackhole - MySQL Storage Engine

An Updated Version of "Blackhole - MySQL Storage Engine" is available in, http://kathyravan.blogspot.com/2008/12/blackhole-mysql-storage-engine_04.html

Keywords: LAMP, MySQL, Blackhole, Storage Engines, MySQL Storage Engines, short-term-data-loss engine, /dev/null engine, Throw Away Engine

Blackhole - MySQL Storage Engine:

The mantra of Blackhole Engine is, Execute ---> Throw Away ---> Forget What Happend; It shall also be called as short-term-data-loss engine.

In a technical nutshell "Black hole" is a "/dev/null" storage engine (anything you write to it disappears)

Confused? The BLACKHOLE storage engine acts as a “black hole” that accepts data but throws it away and does not store it. The blackhole storage engine is a special storage engine provided by mysql. It actually accepts the query and does nothing hence retrievals always yield empty results.

To enable this storage engine if you build MySQL from source, invoke configure with the "--with-blackhole-storage-engine" option. 

To check whether blackhole engine is existing in your Database Server, issue the follwing command:

mysql> SHOW VARIABLES LIKE 'have_blackhole_engine';

If you create a table using "blackhole" engine, it will create only the .frm file associated with the table. No other files are created as it is a throw away engine.

To check the available storage engines, issue the following command:

mysql> show engines;

Usage of Blackhole:

* Shall be used, if you want to check the query syntax alone and dont want to touch the physical records of the mysql engine
* Shall be used, if you want to check the performance of a query using benchmark command


Keywords: LAMP, MySQL, Blackhole, Storage Engines, MySQL Storage Engines, short-term-data-loss engine, /dev/null engine, Throw Away Engine

No comments:

 

Featured Blog Topics:-