InstanceId 函数确定时间系列是否存储在容器中,(如果是)并返回该时间系列的实例标识。
InstanceId(ts TimeSeries) returns integer;
InstanceId(ts TimeSeries) returns bigint;
实例标识在容器中作为索引使用。还可以用于在 TSInstanceTable 表中查找信息。
与指定时间系列关联的实例标识,除非时间系列存储在行而不是容器中,这种情况下返回值为 -1。
select stock_id, InstanceId(activity_data) from activity_stocks;