Skip to content

docs: tql analyze also supports verbose #1711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions docs/reference/sql/tql.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The `TQL` keyword executes TQL language in SQL. The TQL is Time-Series Query Lan
### Syntax

```sql
TQL [EVAL | EVALUATE] (start, end, step) expr
TQL [EVAL | EVALUATE] (start, end, step) expr
```

The `start`, `end` and `step` are the query parameters just like [Prometheus Query API](https://prometheus.io/docs/prometheus/latest/querying/api/):
Expand Down Expand Up @@ -96,7 +96,7 @@ The result should be like the following:
TQL also supports `ANALYZE` keyword to analyze the given PromQL query's execution. The syntax is as follows:

```
TQL ANALYZE (start, end, step) expr;
TQL ANALYZE [VERBOSE] (start, end, step) expr;
```

For example:
Expand All @@ -121,3 +121,9 @@ will get a result like
|
+-------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
```

Using `TQL ANALYZE VERBOSE` will get a verbose result of the execution.

```
TQL ANALYZE VERBOSE (0, 10, '5s') test;
```
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: 介绍了 `TQL` 关键字及其在 GreptimeDB 中的用法,包括
### Syntax

```sql
TQL [EVAL | EVALUATE] (start, end, step) expr
TQL [EVAL | EVALUATE] (start, end, step) expr
```

`start`, `end` 和 `step` 是查询参数,就像 [Prometheus Query API](https://prometheus.io/docs/prometheus/latest/querying/api/) 一样:
Expand Down Expand Up @@ -121,3 +121,9 @@ TQL ANALYZE (0, 10, '5s') test;
|
+-------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
```

使用 `TQL ANALYZE VERBOSE` 可以拿到查询执行时更详细的信息.

```
TQL ANALYZE VERBOSE (0, 10, '5s') test;
```
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: 介绍了 `TQL` 关键字及其在 GreptimeDB 中的用法,包括
### Syntax

```sql
TQL [EVAL | EVALUATE] (start, end, step) expr
TQL [EVAL | EVALUATE] (start, end, step) expr
```

`start`, `end` 和 `step` 是查询参数,就像 [Prometheus Query API](https://prometheus.io/docs/prometheus/latest/querying/api/) 一样:
Expand Down Expand Up @@ -121,3 +121,9 @@ TQL ANALYZE (0, 10, '5s') test;
|
+-------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
```

使用 `TQL ANALYZE VERBOSE` 可以拿到查询执行时更详细的信息.

```
TQL ANALYZE VERBOSE (0, 10, '5s') test;
```
8 changes: 7 additions & 1 deletion versioned_docs/version-0.14/reference/sql/tql.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The `TQL` keyword executes TQL language in SQL. The TQL is Time-Series Query Lan
### Syntax

```sql
TQL [EVAL | EVALUATE] (start, end, step) expr
TQL [EVAL | EVALUATE] (start, end, step) expr
```

The `start`, `end` and `step` are the query parameters just like [Prometheus Query API](https://prometheus.io/docs/prometheus/latest/querying/api/):
Expand Down Expand Up @@ -121,3 +121,9 @@ will get a result like
|
+-------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
```

Using `TQL ANALYZE VERBOSE` will get a verbose result of the execution.

```
TQL ANALYZE VERBOSE (0, 10, '5s') test;
```