TSCARD
AttentionThis page documents an earlier version. Go to the latest (v2.1)version.
Synopsis
TSCARD key
This command returns the number of entires in the given time series.
- If the given
key
is associated with non-timeseries data, an error is raised. - If the given
key
is not associated with any data, 0 is returned.
Return Value
Returns the number of entries in the given time series.
Examples
You can do this as shown below.
$ TSADD ts_key 10 v1 20 v2 30 v3 40 v4 50 v5
"OK"
$ TSCARD ts_key
(integer) 5
$ TSADD ts_key1 10 v1 20 v2 30 v3
"OK"
$ TSCARD ts_key1
(integer) 3
Non-existent key returns 0.
$ TSCARD ts_key2
(integer) 0
See Also
当前内容版权归 YugabyteDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 YugabyteDB .