Redis UNLINK Command Explained

In Redis, the UNLINK command removes the specified keys. It’s similar to the DEL command, except that it performs the memory reclaiming in a different thread, so it is not blocking. The DEL command, on the other hand, doesn’t do this.

More specifically, the UNLINK command unlinks the keys from the keyspace, and then removes it later asynchronously.

Continue reading

MariaDB CASE Statement

In MariaDB, the CASE statement can be used in stored programs to perform a complex conditional construct. It compares a list of conditions and returns a different result depending on which condition (if any) is matched.

The CASE statement is distinct from the CASE operator, in that the CASE statement is specifically for use in stored programs. Also, there’s a slight difference in the syntax.

Continue reading

Redis DECRBY Command Explained

In Redis, the DECRBY command decrements the value of a key by the specified amount.

If the key doesn’t exist, DECRBY creates the key with a value of 0 and then decrements it by the specified amount.

An error occurs if the key contains a value of the wrong type or contains a string that cannot be represented as integer. DECRBY operations are limited to 64 bit signed integers.

Continue reading