ARINFO

ARINFO key [FULL]
Available since:
Redis Open Source 8.8.0
Time complexity:
O(1), or O(N) with FULL option where N is the number of slices.
ACL categories:
@read, @array, @slow,
Compatibility:
Redis Software and Redis Cloud compatibility

Returns metadata about an array.

Required arguments

key

The name of the key that holds the array.

Optional arguments

FULL

When present, includes per-slice statistics in the reply: the number of dense and sparse slices and their average sizes and fill rates. Raises the complexity from O(1) to O(N) where N is the number of slices.

Examples

redis> ARMSET myarray 0 "a" 1 "b" 100 "c"
(integer) 3
redis> ARINSERT myarray "d"
(integer) 0
redis> ARINFO myarray
 1) "count"
 2) (integer) 3
 3) "len"
 4) (integer) 101
 5) "next-insert-index"
 6) (integer) 1
 7) "slices"
 8) (integer) 1
 9) "directory-size"
10) (integer) 1
11) "super-dir-entries"
12) (integer) 0
13) "slice-size"
14) (integer) 4096

Redis Software and Redis Cloud compatibility

Redis
Software
Redis
Cloud
Notes
❌ Standard
❌ Active-Active
❌ Standard
❌ Active-Active

Return information

RATE THIS PAGE
Back to top ↑