Category: redis

  • Khóa học miễn phí Redis – Server nhận dự án làm có lương

    Redis – Server



    Redis server commands are basically used to manage Redis server.

    Example

    Following example explains how we can get all statistics and information about the server.

    redis 127.0.0.1:6379> INFO
    
    # Server
    redis_version:2.8.13
    redis_git_sha1:00000000
    redis_git_dirty:0
    redis_build_id:c2238b38b1edb0e2
    redis_mode:standalone
    os:Linux 3.5.0-48-generic x86_64
    arch_bits:64
    multiplexing_api:epoll
    gcc_version:4.7.2
    process_id:3856
    run_id:0e61abd297771de3fe812a3c21027732ac9f41fe
    tcp_port:6379
    uptime_in_seconds:11554
    uptime_in_days:0 hz:10
    lru_clock:16651447
    config_file:
    
    # Clients
    connected_clients:1
    client_longest_output_list:0
    client_biggest_input_buf:0
    blocked_clients:0
    
    # Memory
    used_memory:589016
    used_memory_human:575.21K
    used_memory_rss:2461696
    used_memory_peak:667312
    used_memory_peak_human:651.67K
    used_memory_lua:33792
    mem_fragmentation_ratio:4.18
    mem_allocator:jemalloc-3.6.0
    
    # Persistence
    loading:0
    rdb_changes_since_last_save:3
    rdb_bgsave_in_progress:0
    rdb_last_save_time:1409158561
    rdb_last_bgsave_status:ok
    rdb_last_bgsave_time_sec:0
    rdb_current_bgsave_time_sec:-1
    aof_enabled:0
    aof_rewrite_in_progress:0
    aof_rewrite_scheduled:0
    aof_last_rewrite_time_sec:-1
    aof_current_rewrite_time_sec:-1
    aof_last_bgrewrite_status:ok
    aof_last_write_status:ok
    
    # Stats
    total_connections_received:24
    total_commands_processed:294
    instantaneous_ops_per_sec:0
    rejected_connections:0
    sync_full:0
    sync_partial_ok:0
    sync_partial_err:0
    expired_keys:0
    evicted_keys:0
    keyspace_hits:41
    keyspace_misses:82
    pubsub_channels:0
    pubsub_patterns:0
    latest_fork_usec:264
    
    # Replication
    role:master
    connected_slaves:0
    master_repl_offset:0
    repl_backlog_active:0
    repl_backlog_size:1048576
    repl_backlog_first_byte_offset:0
    repl_backlog_histlen:0
    
    # CPU
    used_cpu_sys:10.49
    used_cpu_user:4.96
    used_cpu_sys_children:0.00
    used_cpu_user_children:0.01
    
    # Keyspace
    db0:keys = 94,expires = 1,avg_ttl = 41638810
    db1:keys = 1,expires = 0,avg_ttl = 0
    db3:keys = 1,expires = 0,avg_ttl = 0
    

    Redis Server Commands

    Following table lists some basic commands related to Redis server.

    Sr.No Command & Description
    1

    Asynchronously rewrites the append-only file

    2

    Asynchronously saves the dataset to the disk

    3

    Kills the connection of a client

    4

    Gets the list of client connections to the server

    5

    Gets the name of the current connection

    6

    Stops processing commands from the clients for a specified time

    7

    Sets the current connection name

    8

    Gets an array of Cluster slot to node mappings

    9

    Gets an array of Redis command details

    10

    Gets total number of Redis commands

    11

    Extracts the keys given a full Redis command

    12

    Asynchronously saves the dataset to the disk

    13

    Gets an array of specific Redis command details

    14

    Gets the value of a configuration parameter

    15

    Rewrites the configuration file with the in-memory configuration

    16

    Sets a configuration parameter to the given value

    17

    Resets the stats returned by INFO

    18

    Returns the number of keys in the selected database

    19

    Gets debugging information about a key

    20

    Makes the server crash

    21

    Removes all the keys from all databases

    22

    Removes all the keys from the current database

    23

    Gets information and statistics about the server

    24

    Gets the UNIX time stamp of the last successful save to the disk

    25

    Listens for all the requests received by the server in real time

    26

    Returns the role of the instance in the context of replication

    27

    Synchronously saves the dataset to the disk

    28

    Synchronously saves the dataset to the disk and then shuts down the server

    29

    Makes the server a slave of another instance, or promotes it as a master

    30

    Manages the Redis slow queries log

    31

    Command used for replication

    32

    Returns the current server time


    Khóa học lập trình tại Toidayhoc vừa học vừa làm dự án vừa nhận lương: Khóa học lập trình nhận lương tại trung tâm Toidayhoc

  • Khóa học miễn phí Redis – Overview nhận dự án làm có lương

    Redis – Overview



    Redis is an open source, advanced key-value store and an apt solution for building highperformance, scalable web applications.

    Redis has three main peculiarities that sets it apart.

    • Redis holds its database entirely in the memory, using the disk only for persistence.

    • Redis has a relatively rich set of data types when compared to many key-value data stores.

    • Redis can replicate data to any number of slaves.

    Redis Advantages

    Following are certain advantages of Redis.

    • Exceptionally fast − Redis is very fast and can perform about 110000 SETs per second, about 81000 GETs per second.

    • Supports rich data types − Redis natively supports most of the datatypes that developers already know such as list, set, sorted set, and hashes. This makes it easy to solve a variety of problems as we know which problem can be handled better by which data type.

    • Operations are atomic − All Redis operations are atomic, which ensures that if two clients concurrently access, Redis server will receive the updated value.

    • Multi-utility tool − Redis is a multi-utility tool and can be used in a number of use cases such as caching, messaging-queues (Redis natively supports Publish/Subscribe), any short-lived data in your application, such as web application sessions, web page hit counts, etc.

    Redis Versus Other Key-value Stores

    • Redis is a different evolution path in the key-value DBs, where values can contain more complex data types, with atomic operations defined on those data types.

    • Redis is an in-memory database but persistent on disk database, hence it represents a different trade off where very high write and read speed is achieved with the limitation of data sets that can”t be larger than the memory.

    • Another advantage of in-memory databases is that the memory representation of complex data structures is much simpler to manipulate compared to the same data structure on disk. Thus, Redis can do a lot with little internal complexity.


    Khóa học lập trình tại Toidayhoc vừa học vừa làm dự án vừa nhận lương: Khóa học lập trình nhận lương tại trung tâm Toidayhoc

  • Khóa học miễn phí Redis – Data types nhận dự án làm có lương

    Redis – Data Types



    Redis supports 5 types of data types.

    Strings

    Redis string is a sequence of bytes. Strings in Redis are binary safe, meaning they have a known length not determined by any special terminating characters. Thus, you can store anything up to 512 megabytes in one string.

    Example

    redis 127.0.0.1:6379> SET name "tutorialspoint"
    OK
    redis 127.0.0.1:6379> GET name
    "tutorialspoint"
    

    In the above example, SET and GET are Redis commands, name is the key used in Redis and tutorialspoint is the string value that is stored in Redis.

    Note − A string value can be at max 512 megabytes in length.

    Hashes

    A Redis hash is a collection of key value pairs. Redis Hashes are maps between string fields and string values. Hence, they are used to represent objects.

    Example

    redis 127.0.0.1:6379> HMSET user:1 username tutorialspoint password
    tutorialspoint points 200
    OK
    redis 127.0.0.1:6379> HGETALL user:1
    1) "username"
    2) "tutorialspoint"
    3) "password"
    4) "tutorialspoint"
    5) "points"
    6) "200"
    

    In the above example, hash data type is used to store the user”s object which contains basic information of the user. Here HMSET, HGETALL are commands for Redis, while user − 1 is the key.

    Every hash can store up to 232 – 1 field-value pairs (more than 4 billion).

    Lists

    Redis Lists are simply lists of strings, sorted by insertion order. You can add elements to a Redis List on the head or on the tail.

    Example

    redis 127.0.0.1:6379> lpush tutoriallist redis
    (integer) 1
    redis 127.0.0.1:6379> lpush tutoriallist mongodb
    (integer) 2
    redis 127.0.0.1:6379> lpush tutoriallist rabitmq
    (integer) 3
    redis 127.0.0.1:6379> lrange tutoriallist 0 10
    
    1) "rabitmq"
    2) "mongodb"
    3) "redis"
    

    The max length of a list is 232 – 1 elements (4294967295, more than 4 billion of elements per list).

    Sets

    Redis Sets are an unordered collection of strings. In Redis, you can add, remove, and test for the existence of members in O(1) time complexity.

    Example

    redis 127.0.0.1:6379> sadd tutoriallist redis
    (integer) 1
    redis 127.0.0.1:6379> sadd tutoriallist mongodb
    (integer) 1
    redis 127.0.0.1:6379> sadd tutoriallist rabitmq
    (integer) 1
    redis 127.0.0.1:6379> sadd tutoriallist rabitmq
    (integer) 0
    redis 127.0.0.1:6379> smembers tutoriallist
    
    1) "rabitmq"
    2) "mongodb"
    3) "redis"
    

    Note − In the above example, rabitmq is added twice, however due to unique property of the set, it is added only once.

    The max number of members in a set is 232 – 1 (4294967295, more than 4 billion of members per set).

    Sorted Sets

    Redis Sorted Sets are similar to Redis Sets, non-repeating collections of Strings. The difference is, every member of a Sorted Set is associated with a score, that is used in order to take the sorted set ordered, from the smallest to the greatest score. While members are unique, the scores may be repeated.

    Example

    redis 127.0.0.1:6379> zadd tutoriallist 0 redis
    (integer) 1
    redis 127.0.0.1:6379> zadd tutoriallist 0 mongodb
    (integer) 1
    redis 127.0.0.1:6379> zadd tutoriallist 0 rabitmq
    (integer) 1
    redis 127.0.0.1:6379> zadd tutoriallist 0 rabitmq
    (integer) 0
    redis 127.0.0.1:6379> ZRANGEBYSCORE tutoriallist 0 1000
    
    1) "redis"
    2) "mongodb"
    3) "rabitmq"
    

    Khóa học lập trình tại Toidayhoc vừa học vừa làm dự án vừa nhận lương: Khóa học lập trình nhận lương tại trung tâm Toidayhoc

  • Khóa học miễn phí Redis – Commands nhận dự án làm có lương

    Redis – Commands



    Redis commands are used to perform some operations on Redis server.

    To run commands on Redis server, you need a Redis client. Redis client is available in Redis package, which we have installed earlier.

    Syntax

    Following is the basic syntax of Redis client.

    $redis-cli
    

    Example

    Following example explains how we can start Redis client.

    To start Redis client, open the terminal and type the command redis-cli. This will connect to your local server and now you can run any command.

    $redis-cli
    redis 127.0.0.1:6379>
    redis 127.0.0.1:6379> PING
    PONG
    

    In the above example, we connect to Redis server running on the local machine and execute a command PING, that checks whether the server is running or not.

    Run Commands on the Remote Server

    To run commands on Redis remote server, you need to connect to the server by the same client redis-cli

    Syntax

    $ redis-cli -h host -p port -a password
    

    Example

    Following example shows how to connect to Redis remote server, running on host 127.0.0.1, port 6379 and has password mypass.

    $redis-cli -h 127.0.0.1 -p 6379 -a "mypass"
    redis 127.0.0.1:6379>
    redis 127.0.0.1:6379> PING
    PONG
    

    Khóa học lập trình tại Toidayhoc vừa học vừa làm dự án vừa nhận lương: Khóa học lập trình nhận lương tại trung tâm Toidayhoc

  • Khóa học miễn phí Redis – Strings nhận dự án làm có lương

    Redis – Strings



    Redis strings commands are used for managing string values in Redis. Following is the syntax for using Redis string commands.

    Syntax

    redis 127.0.0.1:6379> COMMAND KEY_NAME
    

    Example

    redis 127.0.0.1:6379> SET tutorialspoint redis
    OK
    redis 127.0.0.1:6379> GET tutorialspoint
    "redis"
    

    In the above example, SET and GET are the commands, while tutorialspoint is the key.

    Redis Strings Commands

    Following table lists some basic commands to manage strings in Redis.

    Sr.No Command & Description
    1

    This command sets the value at the specified key.

    2

    Gets the value of a key.

    3

    Gets a substring of the string stored at a key.

    4

    Sets the string value of a key and return its old value.

    5

    Returns the bit value at the offset in the string value stored at the key.

    6

    Gets the values of all the given keys

    7

    Sets or clears the bit at the offset in the string value stored at the key

    8

    Sets the value with the expiry of a key

    9

    Sets the value of a key, only if the key does not exist

    10

    Overwrites the part of a string at the key starting at the specified offset

    11

    Gets the length of the value stored in a key

    12

    Sets multiple keys to multiple values

    13

    Sets multiple keys to multiple values, only if none of the keys exist

    14

    Sets the value and expiration in milliseconds of a key

    15

    Increments the integer value of a key by one

    16

    Increments the integer value of a key by the given amount

    17

    Increments the float value of a key by the given amount

    18

    Decrements the integer value of a key by one

    19

    Decrements the integer value of a key by the given number

    20

    Appends a value to a key


    Khóa học lập trình tại Toidayhoc vừa học vừa làm dự án vừa nhận lương: Khóa học lập trình nhận lương tại trung tâm Toidayhoc

  • Khóa học miễn phí Redis – Configuration nhận dự án làm có lương

    Redis – Configuration



    In Redis, there is a configuration file (redis.conf) available at the root directory of Redis. Although you can get and set all Redis configurations by Redis CONFIG command.

    Syntax

    Following is the basic syntax of Redis CONFIG command.

    redis 127.0.0.1:6379> CONFIG GET CONFIG_SETTING_NAME
    

    Example

    redis 127.0.0.1:6379> CONFIG GET loglevel
    1) "loglevel"
    2) "notice"
    

    To get all configuration settings, use * in place of CONFIG_SETTING_NAME

    Example

    redis 127.0.0.1:6379> CONFIG GET *
      1) "dbfilename"
      2) "dump.rdb"
      3) "requirepass"
      4) ""
      5) "masterauth"
      6) ""
      7) "unixsocket"
      8) ""
      9) "logfile"
     10) ""
     11) "pidfile"
     12) "/var/run/redis.pid"
     13) "maxmemory"
     14) "0"
     15) "maxmemory-samples"
     16) "3"
     17) "timeout"
     18) "0"
     19) "tcp-keepalive"
     20) "0"
     21) "auto-aof-rewrite-percentage"
     22) "100"
     23) "auto-aof-rewrite-min-size"
     24) "67108864"
     25) "hash-max-ziplist-entries"
     26) "512"
     27) "hash-max-ziplist-value"
     28) "64"
     29) "list-max-ziplist-entries"
     30) "512"
     31) "list-max-ziplist-value"
     32) "64"
     33) "set-max-intset-entries"
     34) "512"
     35) "zset-max-ziplist-entries"
     36) "128"
     37) "zset-max-ziplist-value"
     38) "64"
     39) "hll-sparse-max-bytes"
     40) "3000"
     41) "lua-time-limit"
     42) "5000"
     43) "slowlog-log-slower-than"
     44) "10000"
     45) "latency-monitor-threshold"
     46) "0"
     47) "slowlog-max-len"
     48) "128"
     49) "port"
     50) "6379"
     51) "tcp-backlog"
     52) "511"
     53) "databases"
     54) "16"
     55) "repl-ping-slave-period"
     56) "10"
     57) "repl-timeout"
     58) "60"
     59) "repl-backlog-size"
     60) "1048576"
     61) "repl-backlog-ttl"
     62) "3600"
     63) "maxclients"
     64) "4064"
     65) "watchdog-period"
     66) "0"
     67) "slave-priority"
     68) "100"
     69) "min-slaves-to-write"
     70) "0"
     71) "min-slaves-max-lag"
     72) "10"
     73) "hz"
     74) "10"
     75) "no-appendfsync-on-rewrite"
     76) "no"
     77) "slave-serve-stale-data"
     78) "yes"
     79) "slave-read-only"
     80) "yes"
     81) "stop-writes-on-bgsave-error"
     82) "yes"
     83) "daemonize"
     84) "no"
     85) "rdbcompression"
     86) "yes"
     87) "rdbchecksum"
     88) "yes"
     89) "activerehashing"
     90) "yes"
     91) "repl-disable-tcp-nodelay"
     92) "no"
     93) "aof-rewrite-incremental-fsync"
     94) "yes"
     95) "appendonly"
     96) "no"
     97) "dir"
     98) "/home/deepak/Downloads/redis-2.8.13/src"
     99) "maxmemory-policy"
    100) "volatile-lru"
    101) "appendfsync"
    102) "everysec"
    103) "save"
    104) "3600 1 300 100 60 10000"
    105) "loglevel"
    106) "notice"
    107) "client-output-buffer-limit"
    108) "normal 0 0 0 slave 268435456 67108864 60 pubsub 33554432 8388608 60"
    109) "unixsocketperm"
    110) "0"
    111) "slaveof"
    112) ""
    113) "notify-keyspace-events"
    114) ""
    115) "bind"
    116) ""
    

    Edit Configuration

    To update configuration, you can edit redis.conf file directly or you can update configurations via CONFIG set command.

    Syntax

    Following is the basic syntax of CONFIG SET command.

    redis 127.0.0.1:6379> CONFIG SET CONFIG_SETTING_NAME NEW_CONFIG_VALUE
    

    Example

    redis 127.0.0.1:6379> CONFIG SET loglevel "notice"
    OK
    redis 127.0.0.1:6379> CONFIG GET loglevel
    1) "loglevel"
    2) "notice"
    

    Khóa học lập trình tại Toidayhoc vừa học vừa làm dự án vừa nhận lương: Khóa học lập trình nhận lương tại trung tâm Toidayhoc

  • Khóa học miễn phí Redis – Hashes nhận dự án làm có lương

    Redis – Hashes



    Redis Hashes are maps between the string fields and the string values. Hence, they are the perfect data type to represent objects.

    In Redis, every hash can store up to more than 4 billion field-value pairs.

    Example

    redis 127.0.0.1:6379> HMSET tutorialspoint name "redis tutorial"
    description "redis basic commands for caching" likes 20 visitors 23000
    OK
    redis 127.0.0.1:6379> HGETALL tutorialspoint
    1) "name"
    2) "redis tutorial"
    3) "description"
    4) "redis basic commands for caching"
    5) "likes"
    6) "20"
    7) "visitors"
    8) "23000"
    

    In the above example, we have set Redis tutorials detail (name, description, likes, visitors) in hash named ‘tutorialspoint’.

    Redis Hash Commands

    Following table lists some basic commands related to hash.

    Sr.No Command & Description
    1

    Deletes one or more hash fields.

    2

    Determines whether a hash field exists or not.

    3

    Gets the value of a hash field stored at the specified key.

    4

    Gets all the fields and values stored in a hash at the specified key

    5

    Increments the integer value of a hash field by the given number

    6

    Increments the float value of a hash field by the given amount

    7

    Gets all the fields in a hash

    8

    Gets the number of fields in a hash

    9

    Gets the values of all the given hash fields

    10

    Sets multiple hash fields to multiple values

    11

    Sets the string value of a hash field

    12

    Sets the value of a hash field, only if the field does not exist

    13

    Gets all the values in a hash

    14

    Incrementally iterates hash fields and associated values


    Khóa học lập trình tại Toidayhoc vừa học vừa làm dự án vừa nhận lương: Khóa học lập trình nhận lương tại trung tâm Toidayhoc

  • Khóa học miễn phí Redis – Sorted Sets nhận dự án làm có lương

    Redis – Sorted Sets



    Redis Sorted Sets are similar to Redis Sets with the unique feature of values stored in a set. The difference is, every member of a Sorted Set is associated with a score, that is used in order to take the sorted set ordered, from the smallest to the greatest score.

    In Redis sorted set, add, remove, and test for the existence of members in O(1) (constant time regardless of the number of elements contained inside the set). Maximum length of a list is 232 – 1 elements (4294967295, more than 4 billion of elements per set).

    Example

    redis 127.0.0.1:6379> ZADD tutorials 1 redis
    (integer) 1
    redis 127.0.0.1:6379> ZADD tutorials 2 mongodb
    (integer) 1
    redis 127.0.0.1:6379> ZADD tutorials 3 mysql
    (integer) 1
    redis 127.0.0.1:6379> ZADD tutorials 3 mysql
    (integer) 0
    redis 127.0.0.1:6379> ZADD tutorials 4 mysql
    (integer) 0
    redis 127.0.0.1:6379> ZRANGE tutorials 0 10 WITHSCORES
    1) "redis"
    2) "1"
    3) "mongodb"
    4) "2"
    5) "mysql"
    6) "4"
    

    In the above example, three values are inserted with its score in Redis sorted set named ‘tutorials’ by the command ZADD.

    Redis Sorted Sets Commands

    Following table lists some basic commands related to sorted sets.

    Sr.No Command & Description
    1

    Adds one or more members to a sorted set, or updates its score, if it already exists

    2

    Gets the number of members in a sorted set

    3

    Counts the members in a sorted set with scores within the given values

    4

    Increments the score of a member in a sorted set

    5

    Intersects multiple sorted sets and stores the resulting sorted set in a new key

    6

    Counts the number of members in a sorted set between a given lexicographical range

    7

    Returns a range of members in a sorted set, by index

    8

    Returns a range of members in a sorted set, by lexicographical range

    9

    Returns a range of members in a sorted set, by score

    10

    Determines the index of a member in a sorted set

    11

    Removes one or more members from a sorted set

    12

    Removes all members in a sorted set between the given lexicographical range

    13

    Removes all members in a sorted set within the given indexes

    14

    Removes all members in a sorted set within the given scores

    15

    Returns a range of members in a sorted set, by index, with scores ordered from high to low

    16

    Returns a range of members in a sorted set, by score, with scores ordered from high to low

    17

    Determines the index of a member in a sorted set, with scores ordered from high to low

    18

    Gets the score associated with the given member in a sorted set

    19

    Adds multiple sorted sets and stores the resulting sorted set in a new key

    20

    Incrementally iterates sorted sets elements and associated scores


    Khóa học lập trình tại Toidayhoc vừa học vừa làm dự án vừa nhận lương: Khóa học lập trình nhận lương tại trung tâm Toidayhoc

  • Khóa học miễn phí Redis – Sets nhận dự án làm có lương

    Redis – Sets



    Redis Sets are an unordered collection of unique strings. Unique means sets does not allow repetition of data in a key.

    In Redis set add, remove, and test for the existence of members in O(1) (constant time regardless of the number of elements contained inside the Set). The maximum length of a list is 232 – 1 elements (4294967295, more than 4 billion of elements per set).

    Example

    redis 127.0.0.1:6379> SADD tutorials redis
    (integer) 1
    redis 127.0.0.1:6379> SADD tutorials mongodb
    (integer) 1
    redis 127.0.0.1:6379> SADD tutorials mysql
    (integer) 1
    redis 127.0.0.1:6379> SADD tutorials mysql
    (integer) 0
    redis 127.0.0.1:6379> SMEMBERS tutorials
    1) "mysql"
    2) "mongodb"
    3) "redis"
    

    In the above example, three values are inserted in Redis set named ‘tutorials’ by the command SADD.

    Redis Sets Commands

    Following table lists some basic commands related to sets.

    Sr.No Command & Description
    1

    Adds one or more members to a set

    2

    Gets the number of members in a set

    3

    Subtracts multiple sets

    4

    Subtracts multiple sets and stores the resulting set in a key

    5

    Intersects multiple sets

    6

    Intersects multiple sets and stores the resulting set in a key

    7

    Determines if a given value is a member of a set

    8

    Gets all the members in a set

    9

    Moves a member from one set to another

    10

    Removes and returns a random member from a set

    11

    Gets one or multiple random members from a set

    12

    Removes one or more members from a set

    13

    Adds multiple sets

    14

    Adds multiple sets and stores the resulting set in a key

    15

    Incrementally iterates set elements


    Khóa học lập trình tại Toidayhoc vừa học vừa làm dự án vừa nhận lương: Khóa học lập trình nhận lương tại trung tâm Toidayhoc

  • Khóa học miễn phí Redis – HyperLogLog nhận dự án làm có lương

    Redis – HyperLogLog



    Redis HyperLogLog is an algorithm that uses randomization in order to provide an approximation of the number of unique elements in a set using just a constant, and small amount of memory.

    HyperLogLog provides a very good approximation of the cardinality of a set even using a very small amount of memory around 12 kbytes per key with a standard error of 0.81%. There is no limit to the number of items you can count, unless you approach 264 items.

    Example

    Following example explains how Redis HyperLogLog works.

    redis 127.0.0.1:6379> PFADD tutorials "redis"
    1) (integer) 1
    redis 127.0.0.1:6379> PFADD tutorials "mongodb"
    1) (integer) 1
    redis 127.0.0.1:6379> PFADD tutorials "mysql"
    1) (integer) 1
    redis 127.0.0.1:6379> PFCOUNT tutorials
    (integer) 3
    

    Redis HyperLogLog Commands

    Following table lists some basic commands related to Redis HyperLogLog.

    Sr.No Command & Description
    1

    Adds the specified elements to the specified HyperLogLog.

    2

    Returns the approximated cardinality of the set(s) observed by the HyperLogLog at key(s).

    3

    Merges N different HyperLogLogs into a single one.


    Khóa học lập trình tại Toidayhoc vừa học vừa làm dự án vừa nhận lương: Khóa học lập trình nhận lương tại trung tâm Toidayhoc