{
  "id": "ts.info",
  "title": "TS.INFO",
  "url": "https://redis.io/docs/latest/commands/ts.info/",
  "summary": "Returns information and statistics for a time series",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-04-09T10:29:34-04:00",
  "page_type": "content",
  "content_hash": "4bde543a944444d087a471d6ddef3abea19e29027ce13625b8dfc9fca5220794",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Return information and statistics for a time series.\n\n[Examples](#examples)"
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open>\n<summary><code>key</code></summary> \nis key name of the time series.\n</details>"
    },
    {
      "id": "optional-arguments",
      "title": "Optional arguments",
      "role": "parameters",
      "text": "<details open>\n<summary><code>[DEBUG]</code></summary>\n\nis an optional flag to get a more detailed information about the chunks.\n</details>"
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Supported\">&#x2705; Supported</span><br /> | <span title=\"Supported\">&#x2705; Flexible & Annual</span><br /><span title=\"Supported\">&#x2705; Free & Fixed</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n[Array reply]() with information about the time series as flattened name-value pairs:\n\n| Name<br>[Simple string reply]() | Description\n| ---------------------------- | -\n| `totalSamples`    | [Integer reply]()<br> Total number of samples in this time series\n| `memoryUsage`     | [Integer reply]()<br> Total number of bytes allocated for this time series, which is the sum of <br> - The memory used for storing the series' configuration parameters (retention period, duplication policy, etc.)<br>- The memory used for storing the series' compaction rules<br>- The memory used for storing the series' labels (key-value pairs)<br>- The memory used for storing the chunks (chunk header + compressed/uncompressed data)\n| `firstTimestamp`  | [Integer reply]()<br> First timestamp present in this time series (Unix timestamp in milliseconds)\n| `lastTimestamp`   | [Integer reply]()<br> Last timestamp present in this time series  (Unix timestamp in milliseconds)\n| `retentionTime`   | [Integer reply]()<br> The retention period, in milliseconds, for this time series\n| `chunkCount`      | [Integer reply]()<br> Number of chunks used for this time series\n| `chunkSize`       | [Integer reply]()<br> The initial allocation size, in bytes, for the data part of each new chunk.<br>Actual chunks may consume more memory. Changing the chunk size (using [`TS.ALTER`]()) does not affect existing chunks.\n| `chunkType`       | [Simple string reply]()<br> The chunks type: `compressed` or `uncompressed`\n| `duplicatePolicy` | [Simple string reply]() or [Nil reply]()<br> The [duplicate policy]() of this time series\n| `labels`          | [Array reply]() or [Nil reply]()<br> Metadata labels of this time series<br> Each element is a 2-elements [Array reply]() of ([Bulk string reply](), [Bulk string reply]()) representing (label, value)\n| `sourceKey`       | [Bulk string reply]() or [Nil reply]()<br>Key name for source time series in case the current series is a target of a [compaction rule]()\n| `rules`           | [Array reply]()<br> [Compaction rules]() defined in this time series<br> Each rule is an [Array reply]() with 4 elements:<br>- [Bulk string reply](): The compaction key<br>- [Integer reply](): The bucket duration<br>- [Simple string reply](): The aggregator<br>- [Integer reply](): The alignment (since RedisTimeSeries v1.8)\n\nWhen [`DEBUG`]() is specified, the response also contains:\n\n| Name<br>[Simple string reply]() | Description\n| ---------------------------- | -\n| `keySelfName`     | [Bulk string reply]()<br> Name of the key\n| `Chunks`          | [Array reply]() with information about the chunks<br>Each element is an [Array reply]() of information about a single chunk in a name([Simple string reply]())-value pairs:<br>- `startTimestamp` - [Integer reply]() - First timestamp present in the chunk<br>- `endTimestamp` - [Integer reply]() - Last timestamp present in the chunk<br>- `samples` - [Integer reply]() - Total number of samples in the chunk<br>- `size` - [Integer reply]() - the chunk's internal data size (without overheads) in bytes<br>- `bytesPerSample` - [Bulk string reply]() (double) - Ratio of `size` and `samples`\n\n**RESP3:**\n\n[Map reply]() with information about the time series. The map contains the same fields as described in the RESP2 response, but organized as key-value pairs in a map structure rather than a flattened array.\n\nWhen [`DEBUG`]() is specified, the response also contains the additional `keySelfName` and `Chunks` fields as described above."
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "<details open>\n<summary><b>Find information about a temperature/humidity time series by location and sensor type</b></summary>\n\nCreate a set of sensors to measure temperature and humidity in your study and kitchen.\n\n\n127.0.0.1:6379> TS.CREATE telemetry:study:temperature LABELS room study type temperature\nOK\n127.0.0.1:6379> TS.CREATE telemetry:study:humidity LABELS room study type humidity\nOK\n127.0.0.1:6379> TS.CREATE telemetry:kitchen:temperature LABELS room kitchen type temperature\nOK\n127.0.0.1:6379> TS.CREATE telemetry:kitchen:humidity LABELS room kitchen type humidity\nOK\n\n\nFind information about the time series for temperature in the kitchen.\n\n\n127.0.0.1:6379> TS.INFO telemetry:kitchen:temperature\n 1) totalSamples\n 2) (integer) 0\n 3) memoryUsage\n 4) (integer) 4246\n 5) firstTimestamp\n 6) (integer) 0\n 7) lastTimestamp\n 8) (integer) 0\n 9) retentionTime\n10) (integer) 0\n11) chunkCount\n12) (integer) 1\n13) chunkSize\n14) (integer) 4096\n15) chunkType\n16) compressed\n17) duplicatePolicy\n18) (nil)\n19) labels\n20) 1) 1) \"room\"\n       2) \"kitchen\"\n    2) 1) \"type\"\n       2) \"temperature\"\n21) sourceKey\n22) (nil)\n23) rules\n24) (empty array)\n\n\nQuery the time series using DEBUG to get more information about the chunks.\n\n\n127.0.0.1:6379> TS.INFO telemetry:kitchen:temperature DEBUG\n 1) totalSamples\n 2) (integer) 0\n 3) memoryUsage\n 4) (integer) 4246\n 5) firstTimestamp\n 6) (integer) 0\n 7) lastTimestamp\n 8) (integer) 0\n 9) retentionTime\n10) (integer) 0\n11) chunkCount\n12) (integer) 1\n13) chunkSize\n14) (integer) 4096\n15) chunkType\n16) compressed\n17) duplicatePolicy\n18) (nil)\n19) labels\n20) 1) 1) \"room\"\n       2) \"kitchen\"\n    2) 1) \"type\"\n       2) \"temperature\"\n21) sourceKey\n22) (nil)\n23) rules\n24) (empty array)\n25) keySelfName\n26) \"telemetry:kitchen:temperature\"\n27) Chunks\n28) 1)  1) startTimestamp\n        2) (integer) 0\n        3) endTimestamp\n        4) (integer) 0\n        5) samples\n        6) (integer) 0\n        7) size\n        8) (integer) 4096\n        9) bytesPerSample\n       10) \"inf\"\n\n\n</details>"
    },
    {
      "id": "see-also",
      "title": "See also",
      "role": "related",
      "text": "[`TS.RANGE`]() | [`TS.QUERYINDEX`]() | [`TS.GET`]()"
    },
    {
      "id": "related-topics",
      "title": "Related topics",
      "role": "related",
      "text": "[RedisTimeSeries]()"
    }
  ],
  "examples": []
}
