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
@@ -543,13 +543,13 @@ The output for the ClickHouse client is now showing that instead of doing a full
543
543
If <ahref="https://clickhouse.com/docs/operations/server-configuration-parameters/settings/#server_configuration_parameters-logger"target="_blank">trace logging</a> is enabled then the ClickHouse server log file shows that ClickHouse was running a <ahref="https://github.com/ClickHouse/ClickHouse/blob/22.3/src/Storages/MergeTree/MergeTreeDataSelectExecutor.cpp#L1452"target="_blank">binary search</a> over the 1083 UserID index marks, in order to identify granules that possibly can contain rows with a UserID column value of `749927693`. This requires 19 steps with an average time complexity of `O(log2 n)`:
544
544
```response
545
545
...Executor): Key condition: (column 0 in [749927693, 749927693])
546
-
// highlight-next-line
546
+
# highlight-next-line
547
547
...Executor): Running binary search on index range for part all_1_9_2 (1083 marks)
548
548
...Executor): Found (LEFT) boundary mark: 176
549
549
...Executor): Found (RIGHT) boundary mark: 177
550
550
...Executor): Found continuous range in 19 steps
551
551
...Executor): Selected 1/1 parts by partition key, 1 parts by primary key,
552
-
// highlight-next-line
552
+
# highlight-next-line
553
553
1/1083 marks by primary key, 1 marks to read from 1 ranges
554
554
...Reading ...approx. 8192 rows starting from 1441792
@@ -964,7 +964,7 @@ This is the resulting primary key:
964
964
That can now be used to significantly speed up the execution of our example query filtering on the URL column in order to calculate the top 10 users that most frequently clicked on the URL "http://public_search":
965
965
```sql
966
966
SELECT UserID, count(UserID) AS Count
967
-
// highlight-next-line
967
+
-- highlight-next-line
968
968
FROM hits_URL_UserID
969
969
WHERE URL ='http://public_search'
970
970
GROUP BY UserID
@@ -990,7 +990,7 @@ The response is:
990
990
└────────────┴───────┘
991
991
992
992
10 rows in set. Elapsed: 0.017 sec.
993
-
// highlight-next-line
993
+
# highlight-next-line
994
994
Processed 319.49 thousand rows,
995
995
11.38 MB (18.41 million rows/s., 655.75 MB/s.)
996
996
```
@@ -1004,13 +1004,13 @@ The corresponding trace log in the ClickHouse server log file confirms that:
1004
1004
```response
1005
1005
...Executor): Key condition: (column 0 in ['http://public_search',
1006
1006
'http://public_search'])
1007
-
// highlight-next-line
1007
+
# highlight-next-line
1008
1008
...Executor): Running binary search on index range for part all_1_9_2 (1083 marks)
1009
1009
...Executor): Found (LEFT) boundary mark: 644
1010
1010
...Executor): Found (RIGHT) boundary mark: 683
1011
1011
...Executor): Found continuous range in 19 steps
1012
1012
...Executor): Selected 1/1 parts by partition key, 1 parts by primary key,
1013
-
// highlight-next-line
1013
+
# highlight-next-line
1014
1014
39/1083 marks by primary key, 39 marks to read from 1 ranges
1015
1015
...Executor): Reading approx. 319488 rows with 2 streams
1016
1016
```
@@ -1055,19 +1055,19 @@ The response is:
1055
1055
└────────────────────────────────┴───────┘
1056
1056
1057
1057
10 rows in set. Elapsed: 0.024 sec.
1058
-
// highlight-next-line
1058
+
# highlight-next-line
1059
1059
Processed 8.02 million rows,
1060
1060
73.04 MB (340.26 million rows/s., 3.10 GB/s.)
1061
1061
```
1062
1062
1063
1063
Server Log:
1064
1064
```response
1065
1065
...Executor): Key condition: (column 1 in [749927693, 749927693])
1066
-
// highlight-next-line
1066
+
# highlight-next-line
1067
1067
...Executor): Used generic exclusion search over index for part all_1_9_2
1068
1068
with 1453 steps
1069
1069
...Executor): Selected 1/1 parts by partition key, 1 parts by primary key,
1070
-
// highlight-next-line
1070
+
# highlight-next-line
1071
1071
980/1083 marks by primary key, 980 marks to read from 23 ranges
1072
1072
...Executor): Reading approx. 8028160 rows with 10 streams
1073
1073
```
@@ -1119,7 +1119,7 @@ ClickHouse is storing the [column data files](#data-is-stored-on-disk-ordered-by
1119
1119
The implicitly created table (and its primary index) backing the materialized view can now be used to significantly speed up the execution of our example query filtering on the URL column:
1120
1120
```sql
1121
1121
SELECT UserID, count(UserID) AS Count
1122
-
// highlight-next-line
1122
+
-- highlight-next-line
1123
1123
FROM mv_hits_URL_UserID
1124
1124
WHERE URL ='http://public_search'
1125
1125
GROUP BY UserID
@@ -1144,7 +1144,7 @@ The response is:
1144
1144
└────────────┴───────┘
1145
1145
1146
1146
10 rows in set. Elapsed: 0.026 sec.
1147
-
// highlight-next-line
1147
+
# highlight-next-line
1148
1148
Processed 335.87 thousand rows,
1149
1149
13.54 MB (12.91 million rows/s., 520.38 MB/s.)
1150
1150
```
@@ -1156,11 +1156,11 @@ The corresponding trace log in the ClickHouse server log file confirms that Clic
1156
1156
```response
1157
1157
...Executor): Key condition: (column 0 in ['http://public_search',
1158
1158
'http://public_search'])
1159
-
// highlight-next-line
1159
+
# highlight-next-line
1160
1160
...Executor): Running binary search on index range ...
1161
1161
...
1162
1162
...Executor): Selected 4/4 parts by partition key, 4 parts by primary key,
1163
-
// highlight-next-line
1163
+
# highlight-next-line
1164
1164
41/1083 marks by primary key, 41 marks to read from 4 ranges
1165
1165
...Executor): Reading approx. 335872 rows with 4 streams
1166
1166
```
@@ -1203,7 +1203,7 @@ ClickHouse is storing the [column data files](#data-is-stored-on-disk-ordered-by
1203
1203
The hidden table (and its primary index) created by the projection can now be (implicitly) used to significantly speed up the execution of our example query filtering on the URL column. Note that the query is syntactically targeting the source table of the projection.
1204
1204
```sql
1205
1205
SELECT UserID, count(UserID) AS Count
1206
-
// highlight-next-line
1206
+
-- highlight-next-line
1207
1207
FROM hits_UserID_URL
1208
1208
WHERE URL ='http://public_search'
1209
1209
GROUP BY UserID
@@ -1228,7 +1228,7 @@ The response is:
1228
1228
└────────────┴───────┘
1229
1229
1230
1230
10 rows in set. Elapsed: 0.029 sec.
1231
-
// highlight-next-line
1231
+
# highlight-next-line
1232
1232
Processed 319.49 thousand rows, 1
1233
1233
1.38 MB (11.05 million rows/s., 393.58 MB/s.)
1234
1234
```
@@ -1241,14 +1241,14 @@ The corresponding trace log in the ClickHouse server log file confirms that Clic
1241
1241
```response
1242
1242
...Executor): Key condition: (column 0 in ['http://public_search',
1243
1243
'http://public_search'])
1244
-
// highlight-next-line
1244
+
# highlight-next-line
1245
1245
...Executor): Running binary search on index range for part prj_url_userid (1083 marks)
1246
1246
...Executor): ...
1247
-
// highlight-next-line
1247
+
# highlight-next-line
1248
1248
...Executor): Choose complete Normal projection prj_url_userid
0 commit comments