显示关于Distinct Value Cache的信息
使用 influxdb3 show system table 命令 从 distinct_caches 系统表中查询并输出唯一值缓存信息。
influxdb3 show system \
--database DATABASE_NAME \
--token AUTH_TOKEN \
table distinct_caches这将返回一个类似于以下内容的表:
| table | name | column_ids | column_names | max_cardinality | max_age_seconds |
|---|---|---|---|---|---|
| wind_data | wind_distinct | [0, 1, 2] | [country, county, city] | 100000 | 86400 |
| weather | weather_distinct | [0] | [location] | 100 | 604800 |
| bitcoin | bitcoin_dis | [0, 1] | [code, crypto] | 5000 | 86400 |
| home | home_distinct | [0, 1] | [room, wall] | 12000 | 15770000 |
从 distinct_caches 系统表中查询特定列
使用 --select 选项从 distinct_caches 系统表中查询特定列。提供一个逗号分隔的列列表以返回。
influxdb3 show system \
--database DATABASE_NAME \
--token AUTH_TOKEN \
table distinct_caches \
--select name,column_names,max_age_seconds对 distinct_caches 系统表输出进行排序
使用 --order-by 选项按特定列对 distinct_caches 系统表的数据进行排序。提供一个逗号分隔的列列表以进行排序。
influxdb3 show system \
--database DATABASE_NAME \
--token AUTH_TOKEN \
table distinct_caches \
--order-by max_cardinality,max_age_seconds结果将根据提供的列按升序排序。
在上面的示例中,替换以下内容:
DATABASE_NAME:要从中查询系统数据的数据库名称。AUTH_TOKEN: 您的 InfluxDB 3 Core 认证令牌
使用 HTTP API
要使用 HTTP API 查询并输出系统表中的缓存信息,请向 /api/v3/query_sql 端点发送 GET 或 POST 请求。
GET /api/v3/query_sql
POST /api/v3/query_sql
查询所有缓存
curl -X POST "https://:8181/api/v3/query_sql" \
--header "Authorization: Bearer AUTH_TOKEN" \
--json '{
"db": "DATABASE_NAME",
"q": "SELECT * FROM system.distinct_caches",
"format": "json"
}'查询特定的缓存详细信息
curl -X POST "https://:8181/api/v3/query_sql" \
--header "Authorization: Bearer AUTH_TOKEN" \
--json '{
"db": "DATABASE_NAME",
"q": "SELECT * FROM system.distinct_caches WHERE name = '\''CACHE_NAME'\''",
"format": "json"
}'此页面是否有帮助?
感谢您的反馈!
支持和反馈
感谢您成为我们社区的一员!我们欢迎并鼓励您对 InfluxDB 3 Core 和本文档提供反馈和错误报告。要获得支持,请使用以下资源
具有年度合同或支持合同的客户可以 联系 InfluxData 支持。