ELS

Apply for Redis Developer Course Redis Regular Inspection / Technical Support Redis Enterprise Server

List keys

Usage: ELS *
Output is key_name. Example) key1
📍Output (query) count limit: limited by redis.conf ll_max 10000.
📍Why the limit: if there are very many keys (e.g. 10 million or more) and there is no limit, other commands cannot run while this command runs, which can be a problem on production servers.
The default ll_max is 10000. You can change it at runtime with CONFIG SET if needed.

Example

Command>els     ℹ️ If you do not specify 'key_pattern', all keys are listed.
Result>0) key
1) keyB_000652109500
2) keyB_000652109500
.......................
804) myhash76
Command>els *
Result>0) key
1) keyB_000652109500
2) keyB_000652109500
.......................
804) myhash76
Command>els keyA*     ℹ️ List keys starting with keyA
Result>0) key
1) keyA_000375248904
2) keyA_000082855540
.......................
200) keyA_000962842702
Command>els * string     ℹ️ List string data type keys
Result>0) key
1) keyB_000538223312
2) keyB_000652109500
.......................
403) keyA_000962842702    
ℹ️ From ent810, data is stored separately by data type, so specifying a data type is recommended.
Command>els * string count 10     ℹ️ Specify the output (query) count
Result>0) key
1) keyB_000538223312
2) keyB_000652109500
.......................
10) keyB_000015333864


Syntax

ELS [key_pattern] [data_type] [COUNT count]

  • Available since Ent 8.1.0.
  • Time complexity is O(N).

<< EKEYS ELS ELL >>

Email 답글이 올라오면 이메일로 알려드리겠습니다.