In MariaDB, we can use the LOWER()
function to convert uppercase characters to their lowercase equivalent.
We can alternatively use LCASE()
, which is a synonym of LOWER()
.
In MariaDB, we can use the LOWER()
function to convert uppercase characters to their lowercase equivalent.
We can alternatively use LCASE()
, which is a synonym of LOWER()
.
In Redis, the SINTERSTORE
command is the same as the SINTER
command, except that it stores the result in the specified key, instead of returning it.
It stores the members of the set resulting from the intersection of all the given sets.
If the destination key already exists, it’s overwritten. If it doesn’t exist, it’s created and the resulting members are added to it.
Continue readingIn Redis, the SINTER
command returns the members of the set resulting from the intersection of all the given sets.
When setting a timeout on a key in Redis, we have the option of setting the timeout only if it’s less than the existing timeout. We can do this with the LT
option of commands such as EXPIRE
, EXPIREAT
, PEXPIRE
, and PEXPIREAT
.
In PostgreSQL, we can use the -
operator to subtract one or more seconds from a time value.
By “time” value, this could be an actual time
value, a timestamp
, or an interval
. We can also subtract seconds from a date
value or a date
and time
combination.
In Redis, typically when we want to return a key’s value, we use the GET
command. But there’s also a GETEX
command (introduced in Redis 6.2.0) that allows us to get the value and return it’s expiry at the same time.
In Redis, the SDIFFSTORE
command works just like the SDIFF
command, except that instead of returning the result, it stores it in the key that we specify. The destination key will then hold the members of the set resulting from the difference between the first set and all the successive sets.
MySQL supports generated columns. If you’re not sure whether a table has a generated column or not, you can check it using any of the following methods.
Continue readingIn Redis, the SDIFF
command returns the members of the set resulting from the difference between the first set and all the successive sets. In other words, it returns all members of the first set that aren’t in any of the successive sets.
In Redis, we have several options for returning the expiry time of a key. One option from Redis 7.0.0 and above is to return it as a Unix timestamp.
When returning the expiry as a Unix timestamp, we can have it returned in seconds or milliseconds. To return it in seconds, we can use the EXPIRETIME
command. To return it in milliseconds, we can use the PEXPIRETIME
command.