Time complexity: O(N) with N being the number of keys in the database, under the assumption that the key names in the database and the given pattern have limited length.
Returns all keys matching
While the time complexity for this operation is O(N), the constant times are fairly low.
Supported glob-style patterns:
hbllo, ... but not
\ to escape special characters if you want to match them verbatim.
Array reply: list of keys matching
Number of elements returned:
Dragonfly protects itself from an overwhelming number of returned keys by imposing a limit on the quantity. To modify this limit, update the value of the "keys_output_limit" flag. Please refer to Dragonfly configuration for more information how to change dragonfly flag values.
dragonfly> MSET firstname Jack lastname Stuntman age 35
dragonfly> KEYS *name*
dragonfly> KEYS a??
dragonfly> KEYS *