You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/engines/table-engines/mergetree-family/aggregatingmergetree.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,7 +37,7 @@ For a description of request parameters, see [request description](../../../sql-
37
37
38
38
**Query clauses**
39
39
40
-
When creating an `AggregatingMergeTree` table the same [clauses](../../../engines/table-engines/mergetree-family/mergetree.md) are required, as when creating a `MergeTree` table.
40
+
When creating an `AggregatingMergeTree` table, the same [clauses](../../../engines/table-engines/mergetree-family/mergetree.md) are required as when creating a `MergeTree` table.
41
41
42
42
<detailsmarkdown="1">
43
43
@@ -62,19 +62,19 @@ All of the parameters have the same meaning as in `MergeTree`.
62
62
## SELECT and INSERT {#select-and-insert}
63
63
64
64
To insert data, use [INSERT SELECT](../../../sql-reference/statements/insert-into.md) query with aggregate -State- functions.
65
-
When selecting data from `AggregatingMergeTree` table, use `GROUP BY` clause and the same aggregate functions as when inserting data, but using `-Merge` suffix.
65
+
When selecting data from `AggregatingMergeTree` table, use `GROUP BY` clause and the same aggregate functions as when inserting data, but using the `-Merge` suffix.
66
66
67
-
In the results of `SELECT` query, the values of `AggregateFunction` type have implementation-specific binary representation for all of the ClickHouse output formats. If dump data into, for example, `TabSeparated` format with `SELECT` query then this dump can be loaded back using `INSERT` query.
67
+
In the results of `SELECT` query, the values of `AggregateFunction` type have implementation-specific binary representation for all of the ClickHouse output formats. For example, if you dump data into`TabSeparated` format with a `SELECT` query, then this dump can be loaded back using an`INSERT` query.
68
68
69
69
## Example of an Aggregated Materialized View {#example-of-an-aggregated-materialized-view}
70
70
71
-
The following examples assumes that you have a database named `test` so make sure you create that if it doesn't already exist:
71
+
The following example assumes that you have a database named `test`, so create it if it doesn't already exist:
72
72
73
73
```sql
74
74
CREATEDATABASEtest;
75
75
```
76
76
77
-
We will create the table `test.visits` that contain the raw data:
77
+
Now create the table `test.visits` that contains the raw data:
78
78
79
79
```sql
80
80
CREATETABLEtest.visits
@@ -86,9 +86,9 @@ CREATE TABLE test.visits
86
86
) ENGINE = MergeTree ORDER BY (StartDate, CounterID);
87
87
```
88
88
89
-
Next, we need to create an `AggregatingMergeTree` table that will store `AggregationFunction`s that keep track of the total number of visits and the number of unique users.
89
+
Next, you need an `AggregatingMergeTree` table that will store `AggregationFunction`s that keep track of the total number of visits and the number of unique users.
90
90
91
-
`AggregatingMergeTree` materialized view that watches the `test.visits` table, and use the `AggregateFunction` type:
91
+
Create an `AggregatingMergeTree` materialized view that watches the `test.visits` table, and uses the `AggregateFunction` type:
Copy file name to clipboardExpand all lines: docs/en/operations/server-configuration-parameters/settings.md
+34-1Lines changed: 34 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2217,6 +2217,39 @@ If the table does not exist, ClickHouse will create it. If the structure of the
2217
2217
</query_log>
2218
2218
```
2219
2219
2220
+
# query_metric_log {#query_metric_log}
2221
+
2222
+
It is disabled by default.
2223
+
2224
+
**Enabling**
2225
+
2226
+
To manually turn on metrics history collection [`system.query_metric_log`](../../operations/system-tables/query_metric_log.md), create `/etc/clickhouse-server/config.d/query_metric_log.xml` with the following content:
To disable `query_metric_log` setting, you should create the following file `/etc/clickhouse-server/config.d/disable_query_metric_log.xml` with the following content:
Copy file name to clipboardExpand all lines: docs/en/sql-reference/functions/type-conversion-functions.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6867,6 +6867,18 @@ Same as for [parseDateTimeInJodaSyntax](#parsedatetimeinjodasyntax) except that
6867
6867
6868
6868
Same as for [parseDateTimeInJodaSyntax](#parsedatetimeinjodasyntax) except that it returns `NULL` when it encounters a date format that cannot be processed.
6869
6869
6870
+
## parseDateTime64InJodaSyntax
6871
+
6872
+
Similar to [parseDateTimeInJodaSyntax](#parsedatetimeinjodasyntax). Differently, it returns a value of type [DateTime64](../data-types/datetime64.md).
6873
+
6874
+
## parseDateTime64InJodaSyntaxOrZero
6875
+
6876
+
Same as for [parseDateTime64InJodaSyntax](#parsedatetime64injodasyntax) except that it returns zero date when it encounters a date format that cannot be processed.
6877
+
6878
+
## parseDateTime64InJodaSyntaxOrNull
6879
+
6880
+
Same as for [parseDateTime64InJodaSyntax](#parsedatetime64injodasyntax) except that it returns `NULL` when it encounters a date format that cannot be processed.
Copy file name to clipboardExpand all lines: programs/server/config.xml
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1195,6 +1195,19 @@
1195
1195
<flush_on_crash>false</flush_on_crash>
1196
1196
</error_log>
1197
1197
1198
+
<!-- Query metric log contains rows Contains history of memory and metric values from table system.events for individual queries, periodically flushed to disk
0 commit comments