fix(v1): split v1.12.3 release — publish OSS, defer Enterprise pending GA
Revert the combined InfluxDB 1.12.3 release commit and re-add only OSS v1.12.3 documentation. Enterprise v1.12.3 docs will be published in a separate PR once the release artifact is GA in the portal. Also adds FUTURE/PAST LIMIT ordering caution for users on versions prior to v1.12.3 (from copilot/restore-ordering-warning-influxql).jts-enterprise-v1.12.3
parent
85ea926e7f
commit
69f06d39a8
|
|
@ -14,6 +14,50 @@ alt_links:
|
|||
---
|
||||
|
||||
|
||||
## v1.12.3 {date="2026-01-12"}
|
||||
|
||||
### Features
|
||||
|
||||
- Add [`https-insecure-certificate` configuration option](/influxdb/v1/administration/config/#https-insecure-certificate)
|
||||
to skip file permission checking for TLS certificate and private key files.
|
||||
- Add [`advanced-expiration` TLS configuration option](/influxdb/v1/administration/config/#advanced-expiration)
|
||||
to configure how far in advance to log warnings about TLS certificate expiration.
|
||||
- Add TLS certificate reloading on `SIGHUP`.
|
||||
- Add `config` and `cq` (continuous query) diagnostics to the `/debug/vars` endpoint.
|
||||
- Improve dropped point logging.
|
||||
- Show user when displaying or logging queries.
|
||||
- Add `time_format` parameter for the HTTP API.
|
||||
- Use dynamic logging levels (`zap.AtomicLevel`).
|
||||
- Report user query bytes.
|
||||
|
||||
### Bug fixes
|
||||
|
||||
- Fix `FUTURE LIMIT` and `PAST LIMIT`
|
||||
[clause order](/influxdb/v1/query_language/manage-database/#future-limit)
|
||||
in retention policy statements.
|
||||
- Add locking in `ClearBadShardList`.
|
||||
- Stop noisy logging about phantom shards that do not belong to a node.
|
||||
- Resolve `RLock()` leakage in `Store.DeleteSeries()`.
|
||||
- Fix condition check for optimization of array cursor (tsm1).
|
||||
- Run `init.sh` `buildtsi` as `influxdb` user.
|
||||
- Reduce unnecessary purger operations and logging.
|
||||
- Sort files for adjacency testing.
|
||||
- Fix operator in host detection (systemd).
|
||||
- Use correct path in open WAL error message.
|
||||
- Handle nested low-level files in compaction.
|
||||
- Correct error logic for writing empty index files.
|
||||
- Reduce lock contention and races in purger.
|
||||
- Fix bug with authorizer leakage in `SHOW QUERIES`.
|
||||
- Rename compact throughput logging keys.
|
||||
- Fix `https-insecure-certificate` not handled properly in httpd.
|
||||
- Prevent level regression when compacting mixed-level TSM files.
|
||||
|
||||
### Other
|
||||
|
||||
- Update Go to 1.24.13.
|
||||
|
||||
---
|
||||
|
||||
## v1.12.2 {date="2025-09-15"}
|
||||
|
||||
### Features
|
||||
|
|
@ -340,7 +384,7 @@ reporting an earlier error.
|
|||
|
||||
- Use latest version of InfluxQL package.
|
||||
- Add `-lponly` flag to [`influx export`](/influxdb/v2/reference/cli/influx/export/) sub-command.
|
||||
- Add the ability to [track number of values](/platform/monitoring/influxdata-platform/tools/measurements-internal/#valueswrittenok) written via the [/debug/vars HTTP endpoint](/influxdb/v1/tools/api/#debug-vars-http-endpoint).
|
||||
- Add the ability to [track number of values](/platform/monitoring/influxdata-platform/tools/measurements-internal/#valueswrittenok) written via the [`/debug/vars` HTTP endpoint](/influxdb/v1/tools/api/#debugvars-http-endpoint).
|
||||
- Update UUID library from [github.com/satori/go.uuid](https://github.com/satori/go.uuid) to [github.com/gofrs/uuid](https://github.com/gofrs/uuid).
|
||||
|
||||
### Bug fixes
|
||||
|
|
@ -637,7 +681,7 @@ Support for the Flux language and queries has been added in this release. To beg
|
|||
|
||||
- Enable Flux using the new configuration setting
|
||||
[`[http] flux-enabled = true`](/influxdb/v1/administration/config/#flux-enabled).
|
||||
- Use the new [`influx -type=flux`](/influxdb/v1/tools/shell/#type) option to enable the Flux REPL shell for creating Flux queries.
|
||||
- Use the new [`influx -type=flux`](/influxdb/v1/tools/influx-cli/) option to enable the Flux REPL shell for creating Flux queries.
|
||||
- Read about Flux and the Flux language, enabling Flux, or jump into the getting started and other guides.
|
||||
|
||||
#### Time Series Index (TSI) query performance and throughputs improvements
|
||||
|
|
|
|||
|
|
@ -933,7 +933,7 @@ effect if [`auth-enabled`](#auth-enabled) is set to `false`.
|
|||
|
||||
User-supplied [HTTP response headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers).
|
||||
Configure this section to return
|
||||
[security headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#Security)
|
||||
[security headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers#security)
|
||||
such as `X-Frame-Options` or `Content Security Policy` where needed.
|
||||
|
||||
Example:
|
||||
|
|
@ -964,9 +964,16 @@ specified, the `httpd` service will try to load the private key from the
|
|||
`https-certificate` file. If a separate `https-private-key` file is specified,
|
||||
the `httpd` service will load the private key from the `https-private-key` file.
|
||||
|
||||
**Default**: `""`
|
||||
**Default**: `""`
|
||||
**Environment variable**: `INFLUXDB_HTTP_HTTPS_PRIVATE_KEY`
|
||||
|
||||
#### https-insecure-certificate {metadata="v1.12.3+"}
|
||||
|
||||
Skips file permission checking for `https-certificate` and `https-private-key` when `true`.
|
||||
|
||||
**Default**: `false`
|
||||
**Environment variable**: `INFLUXDB_HTTP_HTTPS_INSECURE_CERTIFICATE`
|
||||
|
||||
#### shared-secret
|
||||
|
||||
The shared secret used to validate public API requests using JWT tokens.
|
||||
|
|
@ -1638,5 +1645,12 @@ include: `tls1.0`, `tls1.1`, `tls1.2`, and `tls1.3`. If not specified,
|
|||
In this example, `tls1.3` specifies the maximum version as TLS 1.3, which is
|
||||
consistent with the behavior of previous InfluxDB releases.
|
||||
|
||||
**Default**: `tls1.3`
|
||||
**Default**: `tls1.3`
|
||||
**Environment variable**: `INFLUXDB_TLS_MAX_VERSION`
|
||||
|
||||
#### advanced-expiration {metadata="v1.12.3+"}
|
||||
|
||||
Sets how far in advance to log warnings about TLS certificate expiration.
|
||||
|
||||
**Default**: `5d`
|
||||
**Environment variable**: `INFLUXDB_TLS_ADVANCED_EXPIRATION`
|
||||
|
|
|
|||
|
|
@ -62,15 +62,15 @@ Creates a new database.
|
|||
#### Syntax
|
||||
|
||||
```sql
|
||||
CREATE DATABASE <database_name> [WITH [DURATION <duration>] [REPLICATION <n>] [SHARD DURATION <duration>] [PAST LIMIT <duration>] [FUTURE LIMIT <duration>] [NAME <retention-policy-name>]]
|
||||
CREATE DATABASE <database_name> [WITH [DURATION <duration>] [REPLICATION <n>] [SHARD DURATION <duration>] [FUTURE LIMIT <duration>] [PAST LIMIT <duration>] [NAME <retention-policy-name>]]
|
||||
```
|
||||
|
||||
#### Description of syntax
|
||||
|
||||
`CREATE DATABASE` requires a database [name](/influxdb/v1/troubleshooting/frequently-asked-questions/#what-words-and-characters-should-i-avoid-when-writing-data-to-influxdb).
|
||||
|
||||
The `WITH`, `DURATION`, `REPLICATION`, `SHARD DURATION`, `PAST LIMIT`,
|
||||
`FUTURE LIMIT`, and `NAME` clauses are optional and create a single
|
||||
The `WITH`, `DURATION`, `REPLICATION`, `SHARD DURATION`, `FUTURE LIMIT`,
|
||||
`PAST LIMIT`, and `NAME` clauses are optional and create a single
|
||||
[retention policy](/influxdb/v1/concepts/glossary/#retention-policy-rp)
|
||||
associated with the created database.
|
||||
If you do not specify one of the clauses after `WITH`, the relevant behavior
|
||||
|
|
@ -259,7 +259,7 @@ You may disable its auto-creation in the [configuration file](/influxdb/v1/admin
|
|||
#### Syntax
|
||||
|
||||
```sql
|
||||
CREATE RETENTION POLICY <retention_policy_name> ON <database_name> DURATION <duration> REPLICATION <n> [SHARD DURATION <duration>] [PAST LIMIT <duration>] [FUTURE LIMIT <duration>] [DEFAULT]
|
||||
CREATE RETENTION POLICY <retention_policy_name> ON <database_name> DURATION <duration> REPLICATION <n> [SHARD DURATION <duration>] [FUTURE LIMIT <duration>] [PAST LIMIT <duration>] [DEFAULT]
|
||||
```
|
||||
|
||||
#### Description of syntax
|
||||
|
|
@ -307,6 +307,17 @@ See
|
|||
[Shard group duration management](/influxdb/v1/concepts/schema_and_data_layout/#shard-group-duration-management)
|
||||
for recommended configurations.
|
||||
|
||||
##### `FUTURE LIMIT` {metadata="v1.12.0+"}
|
||||
|
||||
The `FUTURE LIMIT` clause defines a time boundary after and relative to _now_
|
||||
in which points written to the retention policy are accepted. If a point has a
|
||||
timestamp after the specified boundary, the point is rejected and the write
|
||||
request returns a partial write error.
|
||||
|
||||
For example, if a write request tries to write data to a retention policy with a
|
||||
`FUTURE LIMIT 6h` and there are points in the request with future timestamps
|
||||
greater than 6 hours from now, those points are rejected.
|
||||
|
||||
##### `PAST LIMIT` {metadata="v1.12.0+"}
|
||||
|
||||
The `PAST LIMIT` clause defines a time boundary before and relative to _now_
|
||||
|
|
@ -318,25 +329,6 @@ For example, if a write request tries to write data to a retention policy with a
|
|||
`PAST LIMIT 6h` and there are points in the request with timestamps older than
|
||||
6 hours, those points are rejected.
|
||||
|
||||
> [!Important]
|
||||
> `PAST LIMIT` cannot be changed after it is set.
|
||||
> This will be fixed in a future release.
|
||||
|
||||
##### `FUTURE LIMIT` {metadata="v1.12.0+"}
|
||||
|
||||
The `FUTURE LIMIT` clause defines a time boundary after and relative to _now_
|
||||
in which points written to the retention policy are accepted. If a point has a
|
||||
timestamp after the specified boundary, the point is rejected and the write
|
||||
request returns a partial write error.
|
||||
|
||||
For example, if a write request tries to write data to a retention policy with a
|
||||
`FUTURE LIMIT 6h` and there are points in the request with future timestamps
|
||||
greater than 6 hours from now, those points are rejected.
|
||||
|
||||
> [!Important]
|
||||
> `FUTURE LIMIT` cannot be changed after it is set.
|
||||
> This will be fixed in a future release.
|
||||
|
||||
##### `DEFAULT`
|
||||
|
||||
Sets the new retention policy as the default retention policy for the database.
|
||||
|
|
@ -372,14 +364,17 @@ See [Create a database with CREATE DATABASE](/influxdb/v1/query_language/manage-
|
|||
|
||||
### Modify retention policies with ALTER RETENTION POLICY
|
||||
|
||||
The `ALTER RETENTION POLICY` query takes the following form, where you must declare at least one of the retention policy attributes `DURATION`, `REPLICATION`, `SHARD DURATION`, or `DEFAULT`:
|
||||
The `ALTER RETENTION POLICY` query takes the following form, where you must declare at least one of the retention policy attributes `DURATION`, `REPLICATION`, `SHARD DURATION`, `FUTURE LIMIT`, `PAST LIMIT`, or `DEFAULT`:
|
||||
```sql
|
||||
ALTER RETENTION POLICY <retention_policy_name> ON <database_name> [DURATION <duration>] [REPLICATION <n>] [SHARD DURATION <duration>] [DEFAULT]
|
||||
ALTER RETENTION POLICY <retention_policy_name> ON <database_name> [DURATION <duration>] [REPLICATION <n>] [SHARD DURATION <duration>] [FUTURE LIMIT <duration>] [PAST LIMIT <duration>] [DEFAULT]
|
||||
```
|
||||
|
||||
{{% warn %}} Replication factors do not serve a purpose with single node instances.
|
||||
{{% /warn %}}
|
||||
|
||||
For information about the `FUTURE LIMIT` and `PAST LIMIT` clauses, see
|
||||
[CREATE RETENTION POLICY](#create-retention-policies-with-create-retention-policy).
|
||||
|
||||
First, create the retention policy `what_is_time` with a `DURATION` of two days:
|
||||
```sql
|
||||
> CREATE RETENTION POLICY "what_is_time" ON "NOAA_water_database" DURATION 2d REPLICATION 1
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
---
|
||||
title: Influx Query Language (InfluxQL) reference
|
||||
description: List of resources for Influx Query Language (InfluxQL).
|
||||
description: InfluxQL is a SQL-like query language for interacting with InfluxDB and providing features specific to storing and analyzing time series data.
|
||||
menu:
|
||||
influxdb_v1:
|
||||
name: InfluxQL reference
|
||||
|
|
@ -8,38 +8,32 @@ menu:
|
|||
parent: InfluxQL
|
||||
aliases:
|
||||
- /influxdb/v2/query_language/spec/
|
||||
related:
|
||||
- /influxdb/v1/query_language/explore-data/
|
||||
- /influxdb/v1/query_language/explore-schema/
|
||||
- /influxdb/v1/query_language/manage-database/
|
||||
---
|
||||
|
||||
## Introduction
|
||||
InfluxQL is a SQL-like query language for interacting with InfluxDB
|
||||
and providing features specific to storing and analyzing time series data.
|
||||
|
||||
Find Influx Query Language (InfluxQL) definitions and details, including:
|
||||
|
||||
- [Notation](/influxdb/v1/query_language/spec/#notation)
|
||||
- [Query representation](/influxdb/v1/query_language/spec/#query-representation)
|
||||
- [Identifiers](/influxdb/v1/query_language/spec/#identifiers)
|
||||
- [Keywords](/influxdb/v1/query_language/spec/#keywords)
|
||||
- [Literals](/influxdb/v1/query_language/spec/#literals)
|
||||
- [Queries](/influxdb/v1/query_language/spec/#queries)
|
||||
- [Statements](/influxdb/v1/query_language/spec/#statements)
|
||||
- [Clauses](/influxdb/v1/query_language/spec/#clauses)
|
||||
- [Expressions](/influxdb/v1/query_language/spec/#expressions)
|
||||
- [Other](/influxdb/v1/query_language/spec/#other)
|
||||
- [Query engine internals](/influxdb/v1/query_language/spec/#query-engine-internals)
|
||||
|
||||
To learn more about InfluxQL, browse the following topics:
|
||||
|
||||
- [Explore your data with InfluxQL](/influxdb/v1/query_language/explore-data/)
|
||||
- [Explore your schema with InfluxQL](/influxdb/v1/query_language/explore-schema/)
|
||||
- [Database management](/influxdb/v1/query_language/manage-database/)
|
||||
- [Authentication and authorization](/influxdb/v1/administration/authentication_and_authorization/).
|
||||
|
||||
InfluxQL is a SQL-like query language for interacting with InfluxDB and providing features specific to storing and analyzing time series data.
|
||||
- [Notation](#notation)
|
||||
- [Query representation](#query-representation)
|
||||
- [Identifiers](#identifiers)
|
||||
- [Keywords](#keywords)
|
||||
- [Literals](#literals)
|
||||
- [Queries](#queries)
|
||||
- [Statements](#statements)
|
||||
- [Clauses](#clauses)
|
||||
- [Expressions](#expressions)
|
||||
- [Comments](#comments)
|
||||
- [Other](#other)
|
||||
- [Query engine internals](#query-engine-internals)
|
||||
|
||||
## Notation
|
||||
|
||||
The syntax is specified using Extended Backus-Naur Form ("EBNF").
|
||||
EBNF is the same notation used in the [Go](http://golang.org) programming language specification, which can be found [here](https://golang.org/ref/spec).
|
||||
Not so coincidentally, InfluxDB is written in Go.
|
||||
EBNF is the same notation used in the [Go programming language specification](https://golang.org/ref/spec).
|
||||
|
||||
```
|
||||
Production = production_name "=" [ Expression ] "." .
|
||||
|
|
@ -91,7 +85,7 @@ The rules:
|
|||
|
||||
- double quoted identifiers can contain any unicode character other than a new line
|
||||
- double quoted identifiers can contain escaped `"` characters (i.e., `\"`)
|
||||
- double quoted identifiers can contain InfluxQL [keywords](/influxdb/v1/query_language/spec/#keywords)
|
||||
- double quoted identifiers can contain InfluxQL [keywords](#keywords)
|
||||
- unquoted identifiers must start with an upper or lowercase ASCII character or "_"
|
||||
- unquoted identifiers may contain only ASCII letters, decimal digits, and "_"
|
||||
|
||||
|
|
@ -129,7 +123,7 @@ SUBSCRIPTIONS TAG TO USER USERS VALUES
|
|||
WHERE WITH WRITE
|
||||
```
|
||||
|
||||
If you use an InfluxQL keywords as an
|
||||
If you use an InfluxQL keyword as an
|
||||
[identifier](/influxdb/v1/concepts/glossary/#identifier) you will need to
|
||||
double quote that identifier in every query.
|
||||
|
||||
|
|
@ -145,7 +139,7 @@ In those cases, `time` does not require double quotes in queries.
|
|||
`time` cannot be a [field key](/influxdb/v1/concepts/glossary/#field-key) or
|
||||
[tag key](/influxdb/v1/concepts/glossary/#tag-key);
|
||||
InfluxDB rejects writes with `time` as a field key or tag key and returns an error.
|
||||
See [Frequently Asked Questions](/influxdb/v1/troubleshooting/frequently-asked-questions/#time) for more information.
|
||||
For more information, see [Frequently Asked Questions](/influxdb/v1/troubleshooting/frequently-asked-questions/#time).
|
||||
|
||||
## Literals
|
||||
|
||||
|
|
@ -229,19 +223,22 @@ regex_lit = "/" { unicode_char } "/" .
|
|||
`=~` matches against
|
||||
`!~` doesn't match against
|
||||
|
||||
|
||||
InfluxQL supports using regular expressions when specifying:
|
||||
|
||||
- [field keys](/influxdb/v1/concepts/glossary/#field-key) and [tag keys](/influxdb/v1/concepts/glossary/#tag-key) in the [`SELECT` clause](/influxdb/v1/query_language/explore-data/#the-basic-select-statement)
|
||||
- [measurements](/influxdb/v1/concepts/glossary/#measurement) in the [`FROM` clause](/influxdb/v1/query_language/explore-data/#the-basic-select-statement)
|
||||
- [tag values](/influxdb/v1/concepts/glossary/#tag-value) and string [field values](/influxdb/v1/concepts/glossary/#field-value) in the [`WHERE` clause](/influxdb/v1/query_language/explore-data/#the-where-clause).
|
||||
- [tag keys](/influxdb/v1/concepts/glossary/#tag-key) in the [`GROUP BY` clause](/influxdb/v1/query_language/explore-data/#group-by-tags)
|
||||
|
||||
> [!Note]
|
||||
> InfluxQL supports using regular expressions when specifying:
|
||||
> #### Regular expressions and non-string field values
|
||||
>
|
||||
> * [field keys](/influxdb/v1/concepts/glossary/#field-key) and [tag keys](/influxdb/v1/concepts/glossary/#tag-key) in the [`SELECT` clause](/influxdb/v1/query_language/explore-data/#the-basic-select-statement)
|
||||
> * [measurements](/influxdb/v1/concepts/glossary/#measurement) in the [`FROM` clause](/influxdb/v1/query_language/explore-data/#the-basic-select-statement)
|
||||
> * [tag values](/influxdb/v1/concepts/glossary/#tag-value) and string [field values](/influxdb/v1/concepts/glossary/#field-value) in the [`WHERE` clause](/influxdb/v1/query_language/explore-data/#the-where-clause).
|
||||
> * [tag keys](/influxdb/v1/concepts/glossary/#tag-key) in the [`GROUP BY` clause](/influxdb/v1/query_language/explore-data/#group-by-tags)
|
||||
>
|
||||
>Currently, InfluxQL does not support using regular expressions to match
|
||||
>non-string field values in the
|
||||
>`WHERE` clause,
|
||||
>[databases](/influxdb/v1/concepts/glossary/#database), and
|
||||
>[retention polices](/influxdb/v1/concepts/glossary/#retention-policy-rp).
|
||||
> Currently, InfluxQL does not support using regular expressions to match
|
||||
> non-string field values in the
|
||||
> `WHERE` clause,
|
||||
> [databases](/influxdb/v1/concepts/glossary/#database), and
|
||||
> [retention policies](/influxdb/v1/concepts/glossary/#retention-policy-rp).
|
||||
|
||||
## Queries
|
||||
|
||||
|
|
@ -306,6 +303,8 @@ alter_retention_policy_stmt = "ALTER RETENTION POLICY" policy_name on_clause
|
|||
retention_policy_option
|
||||
[ retention_policy_option ]
|
||||
[ retention_policy_option ]
|
||||
[ retention_policy_option ]
|
||||
[ retention_policy_option ]
|
||||
[ retention_policy_option ] .
|
||||
```
|
||||
|
||||
|
|
@ -318,6 +317,9 @@ ALTER RETENTION POLICY "1h.cpu" ON "mydb" DEFAULT
|
|||
-- Change duration and replication factor.
|
||||
-- REPLICATION (replication factor) not valid for OSS instances.
|
||||
ALTER RETENTION POLICY "policy1" ON "somedb" DURATION 1h REPLICATION 4
|
||||
|
||||
-- Change future and past limits.
|
||||
ALTER RETENTION POLICY "policy1" ON "somedb" FUTURE LIMIT 6h PAST LIMIT 6h
|
||||
```
|
||||
|
||||
### CREATE CONTINUOUS QUERY
|
||||
|
|
@ -378,12 +380,21 @@ create_database_stmt = "CREATE DATABASE" db_name
|
|||
[ retention_policy_duration ]
|
||||
[ retention_policy_replication ]
|
||||
[ retention_policy_shard_group_duration ]
|
||||
[ retention_past_limit ]
|
||||
[ retention_future_limit ]
|
||||
[ retention_past_limit ]
|
||||
[ retention_policy_name ]
|
||||
] .
|
||||
```
|
||||
|
||||
> [!Note]
|
||||
> When using both `FUTURE LIMIT` and `PAST LIMIT` clauses, `FUTURE LIMIT` must appear before `PAST LIMIT`.
|
||||
|
||||
> [!Caution]
|
||||
> **Prior to InfluxDB v1.12.3**, when using both `FUTURE LIMIT` and `PAST LIMIT` clauses,
|
||||
> `PAST LIMIT` must appear before `FUTURE LIMIT`.
|
||||
> [Upgrade to InfluxDB v1.12.3 or later](/influxdb/v1/about_the_project/release-notes/#v1123)
|
||||
> to use the order shown above.
|
||||
|
||||
> [!Warning]
|
||||
> Replication factors do not serve a purpose with single node instances.
|
||||
|
||||
|
|
@ -402,8 +413,8 @@ CREATE DATABASE "bar" WITH DURATION 1d REPLICATION 1 SHARD DURATION 30m NAME "my
|
|||
CREATE DATABASE "mydb" WITH NAME "myrp"
|
||||
|
||||
-- Create a database called bar with a new retention policy named "myrp", and
|
||||
-- specify the duration, past and future limits, and name of that retention policy
|
||||
CREATE DATABASE "bar" WITH DURATION 1d PAST LIMIT 6h FUTURE LIMIT 6h NAME "myrp"
|
||||
-- specify the duration, future and past limits, and name of that retention policy
|
||||
CREATE DATABASE "bar" WITH DURATION 1d FUTURE LIMIT 6h PAST LIMIT 6h NAME "myrp"
|
||||
```
|
||||
|
||||
### CREATE RETENTION POLICY
|
||||
|
|
@ -413,11 +424,20 @@ create_retention_policy_stmt = "CREATE RETENTION POLICY" policy_name on_clause
|
|||
retention_policy_duration
|
||||
retention_policy_replication
|
||||
[ retention_policy_shard_group_duration ]
|
||||
[ retention_past_limit ]
|
||||
[ retention_future_limit ]
|
||||
[ retention_past_limit ]
|
||||
[ "DEFAULT" ] .
|
||||
```
|
||||
|
||||
> [!Note]
|
||||
> When using both `FUTURE LIMIT` and `PAST LIMIT` clauses, `FUTURE LIMIT` must appear before `PAST LIMIT`.
|
||||
|
||||
> [!Caution]
|
||||
> **Prior to InfluxDB v1.12.3**, when using both `FUTURE LIMIT` and `PAST LIMIT` clauses,
|
||||
> `PAST LIMIT` must appear before `FUTURE LIMIT`.
|
||||
> [Upgrade to InfluxDB v1.12.3 or later](/influxdb/v1/about_the_project/release-notes/#v1123)
|
||||
> to use the order shown above.
|
||||
|
||||
> [!Warning]
|
||||
> Replication factors do not serve a purpose with single node instances.
|
||||
|
||||
|
|
@ -433,8 +453,8 @@ CREATE RETENTION POLICY "10m.events" ON "somedb" DURATION 60m REPLICATION 2 DEFA
|
|||
-- Create a retention policy and specify the shard group duration.
|
||||
CREATE RETENTION POLICY "10m.events" ON "somedb" DURATION 60m REPLICATION 2 SHARD DURATION 30m
|
||||
|
||||
-- Create a retention policy and specify past and future limits.
|
||||
CREATE RETENTION POLICY "10m.events" ON "somedb" DURATION 12h PAST LIMIT 6h FUTURE LIMIT 6h
|
||||
-- Create a retention policy and specify future and past limits.
|
||||
CREATE RETENTION POLICY "10m.events" ON "somedb" DURATION 12h FUTURE LIMIT 6h PAST LIMIT 6h
|
||||
```
|
||||
|
||||
### CREATE SUBSCRIPTION
|
||||
|
|
@ -629,7 +649,7 @@ SIZE OF BLOCKS: 931
|
|||
|
||||
### EXPLAIN ANALYZE
|
||||
|
||||
Executes the specified SELECT statement and returns data on the query performance and storage during runtime, visualized as a tree. Use this statement to analyze query performance and storage, including [execution time](#execution-time) and [planning time](#planning-time), and the [iterator type](#iterator-type) and [cursor type](#cursor-type).
|
||||
Executes the specified SELECT statement and returns data on the query performance and storage during runtime, visualized as a tree. Use this statement to analyze query performance and storage, including [execution time](#execution_time) and [planning time](#planning_time), and the [iterator type](#iterator-type) and [cursor type](#cursor-type).
|
||||
|
||||
For example, executing the following statement:
|
||||
|
||||
|
|
@ -725,7 +745,8 @@ For more information about storage blocks, see [TSM files](/influxdb/v1/concepts
|
|||
|
||||
### GRANT
|
||||
|
||||
> **NOTE:** Users can be granted privileges on databases that do not yet exist.
|
||||
> [!Note]
|
||||
> Users can be granted privileges on databases that do not yet exist.
|
||||
|
||||
```
|
||||
grant_stmt = "GRANT" privilege [ on_clause ] to_clause .
|
||||
|
|
@ -743,20 +764,17 @@ GRANT READ ON "mydb" TO "jdoe"
|
|||
|
||||
### KILL QUERY
|
||||
|
||||
Stop currently-running query.
|
||||
Stop a currently-running query.
|
||||
|
||||
```sql
|
||||
KILL QUERY <query_id>
|
||||
```
|
||||
|
||||
```
|
||||
kill_query_statement = "KILL QUERY" query_id .
|
||||
```
|
||||
|
||||
Where `query_id` is the query ID, displayed in the [`SHOW QUERIES`](/influxdb/v1/troubleshooting/query_management/#list-currently-running-queries-with-show-queries) output as `qid`.
|
||||
|
||||
> ***InfluxDB Enterprise clusters:*** To kill queries on a cluster, you need to specify the query ID (qid) and the TCP host (for example, `myhost:8088`),
|
||||
> available in the `SHOW QUERIES` output.
|
||||
>
|
||||
> ```sql
|
||||
KILL QUERY <qid> ON "<host>"
|
||||
```
|
||||
Replace `query_id` with your query ID from [`SHOW QUERIES`](/influxdb/v1/troubleshooting/query_management/#list-currently-running-queries-with-show-queries), output as `qid`.
|
||||
|
||||
#### Examples
|
||||
|
||||
|
|
@ -765,11 +783,6 @@ KILL QUERY <qid> ON "<host>"
|
|||
KILL QUERY 36
|
||||
```
|
||||
|
||||
```sql
|
||||
-- kill query on InfluxDB Enterprise cluster
|
||||
KILL QUERY 53 ON "myhost:8088"
|
||||
```
|
||||
|
||||
### REVOKE
|
||||
|
||||
```sql
|
||||
|
|
@ -912,7 +925,7 @@ show_grants_stmt = "SHOW GRANTS FOR" user_name .
|
|||
SHOW GRANTS FOR "jdoe"
|
||||
```
|
||||
|
||||
#### SHOW MEASUREMENT CARDINALITY
|
||||
### SHOW MEASUREMENT CARDINALITY
|
||||
|
||||
Estimates or counts exactly the cardinality of the measurement set for the current database unless a database is specified using the `ON <database>` option.
|
||||
|
||||
|
|
@ -999,10 +1012,11 @@ Estimates or counts exactly the cardinality of the series for the current databa
|
|||
|
||||
[Series cardinality](/influxdb/v1/concepts/glossary/#series-cardinality) is the major factor that affects RAM requirements. For more information, see:
|
||||
|
||||
- [When do I need more RAM?](/influxdb/v1/guides/hardware_sizing/#when-do-i-need-more-ram) in [Hardware Sizing Guidelines](/influxdb/v1/guides/hardware_sizing/)
|
||||
- [Hardware Sizing Guidelines](/influxdb/v1/guides/hardware_sizing/)
|
||||
- [Don't have too many series](/influxdb/v1/concepts/schema_and_data_layout/#avoid-too-many-series)
|
||||
|
||||
> **Note:** `ON <database>`, `FROM <sources>`, `WITH KEY = <key>`, `WHERE <condition>`, `GROUP BY <dimensions>`, and `LIMIT/OFFSET` clauses are optional.
|
||||
> [!Note]
|
||||
> `ON <database>`, `FROM <sources>`, `WITH KEY = <key>`, `WHERE <condition>`, `GROUP BY <dimensions>`, and `LIMIT/OFFSET` clauses are optional.
|
||||
> When using these query clauses, the query falls back to an exact count.
|
||||
> Filtering by `time` is not supported in the `WHERE` clause.
|
||||
|
||||
|
|
@ -1069,26 +1083,18 @@ id database retention_policy shard_group start_time end_time
|
|||
|
||||
Returns detailed statistics on available components of an InfluxDB node and available (enabled) components.
|
||||
|
||||
Statistics returned by `SHOW STATS` are stored in memory and reset to zero when the node is restarted,
|
||||
but `SHOW STATS` is triggered every 10 seconds to populate the `_internal` database.
|
||||
|
||||
The `SHOW STATS` command does not list index memory usage --
|
||||
use the [`SHOW STATS FOR 'indexes'`](#show-stats-for-indexes) command.
|
||||
|
||||
For more information on using the `SHOW STATS` command, see [Using the SHOW STATS command to monitor InfluxDB](/platform/monitoring/tools/show-stats/).
|
||||
|
||||
```
|
||||
show_stats_stmt = "SHOW STATS [ FOR '<component>' | 'indexes' ]"
|
||||
```
|
||||
|
||||
#### `SHOW STATS`
|
||||
|
||||
- The `SHOW STATS` command does not list index memory usage -- use the [`SHOW STATS FOR 'indexes'`](#show-stats-for-indexes) command.
|
||||
- Statistics returned by `SHOW STATS` are stored in memory and reset to zero when the node is restarted, but `SHOW STATS` is triggered every 10 seconds to populate the `_internal` database.
|
||||
|
||||
#### `SHOW STATS FOR <component>`
|
||||
|
||||
- For the specified component (\<component\>), the command returns available statistics.
|
||||
- For the `runtime` component, the command returns an overview of memory usage by the InfluxDB system, using the [Go runtime](https://golang.org/pkg/runtime/) package.
|
||||
|
||||
#### `SHOW STATS FOR 'indexes'`
|
||||
|
||||
- Returns an estimate of memory use of all indexes. Index memory use is not reported with `SHOW STATS` because it is a potentially expensive operation.
|
||||
|
||||
#### Example
|
||||
|
||||
```sql
|
||||
|
|
@ -1098,7 +1104,6 @@ name: runtime
|
|||
Alloc Frees HeapAlloc HeapIdle HeapInUse HeapObjects HeapReleased HeapSys Lookups Mallocs NumGC NumGoroutine PauseTotalNs Sys TotalAlloc
|
||||
4136056 6684537 4136056 34586624 5816320 49412 0 40402944 110 6733949 83 44 36083006 46692600 439945704
|
||||
|
||||
|
||||
name: graphite
|
||||
tags: proto=tcp
|
||||
batches_tx bytes_rx connections_active connections_handled points_rx points_tx
|
||||
|
|
@ -1106,6 +1111,17 @@ batches_tx bytes_rx connections_active connections_handled
|
|||
159 3999750 0 1 158110 158110
|
||||
```
|
||||
|
||||
### SHOW STATS FOR <component>
|
||||
|
||||
For the specified component (\<component\>), the command returns available statistics.
|
||||
For the `runtime` component, the command returns an overview of memory usage by the InfluxDB system,
|
||||
using the [Go runtime](https://golang.org/pkg/runtime/) package.
|
||||
|
||||
### SHOW STATS FOR 'indexes'
|
||||
|
||||
Returns an estimate of memory use of all indexes.
|
||||
Index memory use is not reported with `SHOW STATS` because it is a potentially expensive operation.
|
||||
|
||||
### SHOW SUBSCRIPTIONS
|
||||
|
||||
```
|
||||
|
|
@ -1118,11 +1134,12 @@ show_subscriptions_stmt = "SHOW SUBSCRIPTIONS" .
|
|||
SHOW SUBSCRIPTIONS
|
||||
```
|
||||
|
||||
#### SHOW TAG KEY CARDINALITY
|
||||
### SHOW TAG KEY CARDINALITY
|
||||
|
||||
Estimates or counts exactly the cardinality of tag key set on the current database unless a database is specified using the `ON <database>` option.
|
||||
|
||||
> **Note:** `ON <database>`, `FROM <sources>`, `WITH KEY = <key>`, `WHERE <condition>`, `GROUP BY <dimensions>`, and `LIMIT/OFFSET` clauses are optional.
|
||||
> [!Note]
|
||||
> `ON <database>`, `FROM <sources>`, `WITH KEY = <key>`, `WHERE <condition>`, `GROUP BY <dimensions>`, and `LIMIT/OFFSET` clauses are optional.
|
||||
> When using these query clauses, the query falls back to an exact count.
|
||||
> Filtering by `time` is only supported when TSI (Time Series Index) is enabled and `time` is not supported in the `WHERE` clause.
|
||||
|
||||
|
|
@ -1190,11 +1207,12 @@ SHOW TAG VALUES WITH KEY !~ /.*c.*/
|
|||
SHOW TAG VALUES FROM "cpu" WITH KEY IN ("region", "host") WHERE "service" = 'redis'
|
||||
```
|
||||
|
||||
#### SHOW TAG VALUES CARDINALITY
|
||||
### SHOW TAG VALUES CARDINALITY
|
||||
|
||||
Estimates or counts exactly the cardinality of tag key values for the specified tag key on the current database unless a database is specified using the `ON <database>` option.
|
||||
|
||||
> **Note:** `ON <database>`, `FROM <sources>`, `WITH KEY = <key>`, `WHERE <condition>`, `GROUP BY <dimensions>`, and `LIMIT/OFFSET` clauses are optional.
|
||||
> [!Note]
|
||||
> `ON <database>`, `FROM <sources>`, `WITH KEY = <key>`, `WHERE <condition>`, `GROUP BY <dimensions>`, and `LIMIT/OFFSET` clauses are optional.
|
||||
> When using these query clauses, the query falls back to an exact count.
|
||||
> Filtering by `time` is only supported when TSI (Time Series Index) is enabled.
|
||||
|
||||
|
|
@ -1274,6 +1292,15 @@ unary_expr = "(" expr ")" | var_ref | time_lit | string_lit | int_lit |
|
|||
float_lit | bool_lit | duration_lit | regex_lit .
|
||||
```
|
||||
|
||||
## Comments
|
||||
|
||||
Use comments with InfluxQL statements to describe your queries.
|
||||
|
||||
- A single line comment begins with two hyphens (`--`) and ends where InfluxDB detects a line break.
|
||||
This comment type cannot span several lines.
|
||||
- A multi-line comment begins with `/*` and ends with `*/`. This comment type can span several lines.
|
||||
Multi-line comments do not support nested multi-line comments.
|
||||
|
||||
## Other
|
||||
|
||||
```
|
||||
|
|
@ -1321,6 +1348,8 @@ retention_policy = identifier .
|
|||
retention_policy_option = retention_policy_duration |
|
||||
retention_policy_replication |
|
||||
retention_policy_shard_group_duration |
|
||||
retention_future_limit |
|
||||
retention_past_limit |
|
||||
"DEFAULT" .
|
||||
|
||||
retention_policy_duration = "DURATION" duration_lit .
|
||||
|
|
@ -1329,6 +1358,10 @@ retention_policy_replication = "REPLICATION" int_lit .
|
|||
|
||||
retention_policy_shard_group_duration = "SHARD DURATION" duration_lit .
|
||||
|
||||
retention_future_limit = "FUTURE LIMIT" duration_lit .
|
||||
|
||||
retention_past_limit = "PAST LIMIT" duration_lit .
|
||||
|
||||
retention_policy_name = "NAME" identifier .
|
||||
|
||||
series_id = int_lit .
|
||||
|
|
@ -1350,15 +1383,6 @@ user_name = identifier .
|
|||
var_ref = measurement .
|
||||
```
|
||||
|
||||
### Comments
|
||||
|
||||
Use comments with InfluxQL statements to describe your queries.
|
||||
|
||||
- A single line comment begins with two hyphens (`--`) and ends where InfluxDB detects a line break.
|
||||
This comment type cannot span several lines.
|
||||
- A multi-line comment begins with `/*` and ends with `*/`. This comment type can span several lines.
|
||||
Multi-line comments do not support nested multi-line comments.
|
||||
|
||||
## Query Engine Internals
|
||||
|
||||
Once you understand the language itself, it's important to know how these
|
||||
|
|
@ -1458,7 +1482,7 @@ iterator.
|
|||
|
||||
### Built-in iterators
|
||||
|
||||
There are many helper iterators that let us build queries:
|
||||
{{% product-name %}} provides many helper iterators for building queries:
|
||||
|
||||
- Merge Iterator - This iterator combines one or more iterators into a single
|
||||
new iterator of the same type. This iterator guarantees that all points
|
||||
|
|
|
|||
|
|
@ -216,7 +216,7 @@ influxdb:
|
|||
latest: v2.8
|
||||
latest_patches:
|
||||
v2: 2.8.0
|
||||
v1: 1.12.2
|
||||
v1: 1.12.3
|
||||
latest_cli:
|
||||
v2: 2.7.5
|
||||
detector_config:
|
||||
|
|
|
|||
Loading…
Reference in New Issue