Monday, December 8, 2008
Blackhole - MySQL Storage Engine (Updated Version 3.0)
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.
Also the insert statements will do nothing in case of a "Blackhole" Table Type.
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';
mysql> SHOW VARIABLES LIKE 'have_blackhole_engine';+-----------------------+-------+| Variable_name | Value |+-----------------------+-------+| have_blackhole_engine | NO |+-----------------------+-------+1 row in set (0.00 sec)The above means that there is no Blackhole Engine available in the Database server. You can enable "Blackhole Engine" using the "--with-blackhole-storage-engine" optionmysql> SHOW VARIABLES LIKE 'have_blackhole_engine';+-----------------------+-------+| Variable_name | Value |+-----------------------+-------+| have_blackhole_engine | Yes |+-----------------------+-------+1 row in set (0.00 sec)
The above means that there Blackhole Engine available in your Database server.
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
* Triggers shall be tested with Blackhole Storage engine to check whether it is working properly
For more information:- http://dev.mysql.com/doc/refman/5.0/en/blackhole-storage-engine.html
Keywords: LAMP, MySQL, Blackhole, Storage Engines, MySQL Storage Engines, short-term-data-loss engine, /dev/null engine, Throw Away Engine
Featured Blog Topics:
- MySQL Show - http://kathyravan.blogspot.com/2008/12/mysql-show-statements.html
- Blackhole - MySQL Storage Engine - http://kathyravan.blogspot.com/2008/12/blackhole-mysql-storage-engine.html
- Memory - MySQL Storage Engine (Formerly Heap Storage Engine) - http://kathyravan.blogspot.com/2008/12/memory-mysql-storage-engine-formerly.html
- Xml in MySQL - http://kathyravan.blogspot.com/2008/03/xml-in-mysql.html
- Forgot mySQL root Password? - http://kathyravan.blogspot.com/2008/02/forgot-mysql-root-password.html
- Samba - Installation & Configuration - http://kathyravan.blogspot.com/2008/02/samba-installation-configuration.html
- Enabling HTTP Authentication in Apache - http://kathyravan.blogspot.com/2008/08/enabling-http-authentication-in-apache.html
- PHP Function: isFTPFileExists (Searching a FILE in FTP) - http://kathyravan.blogspot.com/2008/12/php-function-isftpfileexists-searching.html
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment