Skip to main content
Use ARINFO to inspect how an array is laid out in memory. Alongside len and count, which ARLEN and ARCOUNT also report, the reply describes the slice structure the array is stored in and where the append cursor sits. That is useful when a sparse array is not behaving the way its access pattern suggests it should: a low fill ratio across many slices means the indexes in use are spread thinly, which costs more memory per stored value than a denser layout would. FULL adds statistics about the dense and sparse slices, which requires walking the whole array rather than reading summary counters. See the array command overview for the data model these commands share.

Syntax

Arguments

Important points

  • A key that does not exist returns ERR no such key.

Response

The reply reports the result of the operation. Error replies have the same shape in RESP2 and RESP3 and are surfaced as exceptions by the SDKs below.

Fields

Client libraries often decode bulk strings, maps, sets, and numeric strings into language-native values. The table describes the Redis wire reply.

Examples

TCP examples use the TLS REDIS_URL from the Upstash console. REST examples use UPSTASH_REDIS_REST_URL and UPSTASH_REDIS_REST_TOKEN.
This command is not supported yet in @upstash/redis.
This command is not supported yet in upstash_redis.