mysqlblackhole

What is the purpose of MySQL's BLACKHOLE Engine?


Why would you save something that you can't retrieve later on? What's the point?


Solution

  • It is useful in a replicated environment where all SQL statements are run on all nodes, but you only want some nodes to actually store the result. This is a use case given in the documentation: http://dev.mysql.com/doc/refman/5.0/en/blackhole-storage-engine.html

    Other uses given in the documentation include:

    • Verification of dump file syntax.
    • Measurement of the overhead from binary logging, by comparing performance using BLACKHOLE with and without binary logging enabled.
    • BLACKHOLE is essentially a “no-op” storage engine, so it could be used for finding performance bottlenecks not related to the storage engine itself.