Skip to content

Commit a9a8436

Browse files
authored
Merge pull request #70 from ClickHouse/update-clickhouse
2 parents 8bec68c + e64831d commit a9a8436

26 files changed

+368
-465
lines changed

clickhouse/benchmark.sh

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,13 @@
22

33
# Check if the required arguments are provided
44
if [[ $# -lt 3 ]]; then
5-
echo "Usage: $0 <DB_NAME> <RESULT_FILE_RUNTIMES> <RESULT_FILE_MEMORY_USAGE>"
5+
echo "Usage: $0 <DB_NAME> <RESULT_FILE_RUNTIMES>"
66
exit 1
77
fi
88

99
# Arguments
1010
DB_NAME="$1"
1111
RESULT_FILE_RUNTIMES="$2"
12-
RESULT_FILE_MEMORY_USAGE="$3"
1312

1413
# Construct the query log file name using $DB_NAME
1514
QUERY_LOG_FILE="_query_log_${DB_NAME}.txt"
@@ -44,7 +43,3 @@ MEMORY_RESULTS=$(grep -E '^[0-9]' "$QUERY_LOG_FILE" | awk 'NR % 2 == 0' | awk '{
4443
# Output the runtime results
4544
echo "$RUNTIME_RESULTS" > "$RESULT_FILE_RUNTIMES"
4645
echo "Runtime results written to $RESULT_FILE_RUNTIMES"
47-
48-
# Output the memory usage results
49-
echo "$MEMORY_RESULTS" > "$RESULT_FILE_MEMORY_USAGE"
50-
echo "Memory usage results written to $RESULT_FILE_MEMORY_USAGE"

clickhouse/main.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ benchmark() {
5252
#./query_results.sh "bluesky_${size}m_${suffix}" | tee "${OUTPUT_PREFIX}_bluesky_${size}m_${suffix}.query_results"
5353
./index_usage.sh "bluesky_${size}m_${suffix}" | tee "${OUTPUT_PREFIX}_bluesky_${size}m_${suffix}.index_usage"
5454
./physical_query_plans.sh "bluesky_${size}m_${suffix}" | tee "${OUTPUT_PREFIX}_bluesky_${size}m_${suffix}.physical_query_plans"
55-
./benchmark.sh "bluesky_${size}m_${suffix}" "${OUTPUT_PREFIX}_bluesky_${size}m_${suffix}.results_runtime" "${OUTPUT_PREFIX}_bluesky_${size}m_${suffix}.results_memory_usage"
55+
./benchmark.sh "bluesky_${size}m_${suffix}" "${OUTPUT_PREFIX}_bluesky_${size}m_${suffix}.results_runtime"
5656
./drop_table.sh # also stops ClickHouse
5757
}
5858

clickhouse/results/_index_usage/_m6i.8xlarge_bluesky_1000m_lz4.index_usage

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Expression (Project names)
1010
Indexes:
1111
PrimaryKey
1212
Condition: true
13-
Parts: 30/30
14-
Granules: 567190/567190
13+
Parts: 99/99
14+
Granules: 356251/356251
1515
------------------------------------------------------------------------------------------------------------------------
1616
Index usage for query Q2:
1717

@@ -24,12 +24,12 @@ Expression (Project names)
2424
ReadFromMergeTree (bluesky_1000m_lz4.bluesky)
2525
Indexes:
2626
PrimaryKey
27-
Keys:
27+
Keys:
2828
data.kind
2929
data.commit.operation
3030
Condition: and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\']))
31-
Parts: 30/30
32-
Granules: 537850/567190
31+
Parts: 99/99
32+
Granules: 338299/356251
3333
------------------------------------------------------------------------------------------------------------------------
3434
Index usage for query Q3:
3535

@@ -42,13 +42,13 @@ Expression (Project names)
4242
ReadFromMergeTree (bluesky_1000m_lz4.bluesky)
4343
Indexes:
4444
PrimaryKey
45-
Keys:
45+
Keys:
4646
data.kind
4747
data.commit.operation
4848
data.commit.collection
4949
Condition: and((data.commit.collection in 3-element set), and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\'])))
50-
Parts: 30/30
51-
Granules: 352926/567190
50+
Parts: 99/99
51+
Granules: 223569/356251
5252
------------------------------------------------------------------------------------------------------------------------
5353
Index usage for query Q4:
5454

@@ -62,13 +62,13 @@ Expression (Project names)
6262
ReadFromMergeTree (bluesky_1000m_lz4.bluesky)
6363
Indexes:
6464
PrimaryKey
65-
Keys:
65+
Keys:
6666
data.kind
6767
data.commit.operation
6868
data.commit.collection
6969
Condition: and((data.commit.collection in [\'app.bsky.feed.post\', \'app.bsky.feed.post\']), and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\'])))
70-
Parts: 30/30
71-
Granules: 54185/567190
70+
Parts: 94/94
71+
Granules: 35156/356389
7272
------------------------------------------------------------------------------------------------------------------------
7373
Index usage for query Q5:
7474

@@ -82,10 +82,10 @@ Expression (Project names)
8282
ReadFromMergeTree (bluesky_1000m_lz4.bluesky)
8383
Indexes:
8484
PrimaryKey
85-
Keys:
85+
Keys:
8686
data.kind
8787
data.commit.operation
8888
data.commit.collection
8989
Condition: and((data.commit.collection in [\'app.bsky.feed.post\', \'app.bsky.feed.post\']), and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\'])))
90-
Parts: 30/30
91-
Granules: 54185/567190
90+
Parts: 94/94
91+
Granules: 35156/356389

clickhouse/results/_index_usage/_m6i.8xlarge_bluesky_1000m_zstd.index_usage

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ Expression (Project names)
66
Expression ((Before ORDER BY + Projection))
77
Aggregating
88
Expression ((Before GROUP BY + Change column names to column identifiers))
9-
ReadFromMergeTree (bluesky_100m_zstd.bluesky)
9+
ReadFromMergeTree (bluesky_1000m_zstd.bluesky)
1010
Indexes:
1111
PrimaryKey
1212
Condition: true
13-
Parts: 10/10
14-
Granules: 23394/23394
13+
Parts: 99/99
14+
Granules: 356251/356251
1515
------------------------------------------------------------------------------------------------------------------------
1616
Index usage for query Q2:
1717

@@ -21,15 +21,15 @@ Expression (Project names)
2121
Aggregating
2222
Expression (Before GROUP BY)
2323
Filter ((WHERE + Change column names to column identifiers))
24-
ReadFromMergeTree (bluesky_100m_zstd.bluesky)
24+
ReadFromMergeTree (bluesky_1000m_zstd.bluesky)
2525
Indexes:
2626
PrimaryKey
27-
Keys:
27+
Keys:
2828
data.kind
2929
data.commit.operation
3030
Condition: and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\']))
31-
Parts: 10/10
32-
Granules: 22431/23394
31+
Parts: 99/99
32+
Granules: 338299/356251
3333
------------------------------------------------------------------------------------------------------------------------
3434
Index usage for query Q3:
3535

@@ -39,16 +39,16 @@ Expression (Project names)
3939
Aggregating
4040
Expression (Before GROUP BY)
4141
Filter ((WHERE + Change column names to column identifiers))
42-
ReadFromMergeTree (bluesky_100m_zstd.bluesky)
42+
ReadFromMergeTree (bluesky_1000m_zstd.bluesky)
4343
Indexes:
4444
PrimaryKey
45-
Keys:
45+
Keys:
4646
data.kind
4747
data.commit.operation
4848
data.commit.collection
4949
Condition: and((data.commit.collection in 3-element set), and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\'])))
50-
Parts: 10/10
51-
Granules: 14048/23394
50+
Parts: 99/99
51+
Granules: 223569/356251
5252
------------------------------------------------------------------------------------------------------------------------
5353
Index usage for query Q4:
5454

@@ -59,16 +59,16 @@ Expression (Project names)
5959
Aggregating
6060
Expression (Before GROUP BY)
6161
Filter ((WHERE + Change column names to column identifiers))
62-
ReadFromMergeTree (bluesky_100m_zstd.bluesky)
62+
ReadFromMergeTree (bluesky_1000m_zstd.bluesky)
6363
Indexes:
6464
PrimaryKey
65-
Keys:
65+
Keys:
6666
data.kind
6767
data.commit.operation
6868
data.commit.collection
6969
Condition: and((data.commit.collection in [\'app.bsky.feed.post\', \'app.bsky.feed.post\']), and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\'])))
70-
Parts: 10/10
71-
Granules: 2231/23394
70+
Parts: 99/99
71+
Granules: 35131/356251
7272
------------------------------------------------------------------------------------------------------------------------
7373
Index usage for query Q5:
7474

@@ -79,13 +79,13 @@ Expression (Project names)
7979
Aggregating
8080
Expression (Before GROUP BY)
8181
Filter ((WHERE + Change column names to column identifiers))
82-
ReadFromMergeTree (bluesky_100m_zstd.bluesky)
82+
ReadFromMergeTree (bluesky_1000m_zstd.bluesky)
8383
Indexes:
8484
PrimaryKey
85-
Keys:
85+
Keys:
8686
data.kind
8787
data.commit.operation
8888
data.commit.collection
8989
Condition: and((data.commit.collection in [\'app.bsky.feed.post\', \'app.bsky.feed.post\']), and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\'])))
90-
Parts: 10/10
91-
Granules: 2231/23394
90+
Parts: 99/99
91+
Granules: 35131/356251

clickhouse/results/_index_usage/_m6i.8xlarge_bluesky_100m_lz4.index_usage

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Expression (Project names)
1010
Indexes:
1111
PrimaryKey
1212
Condition: true
13-
Parts: 10/10
14-
Granules: 23394/23394
13+
Parts: 30/30
14+
Granules: 17190/17190
1515
------------------------------------------------------------------------------------------------------------------------
1616
Index usage for query Q2:
1717

@@ -24,12 +24,12 @@ Expression (Project names)
2424
ReadFromMergeTree (bluesky_100m_lz4.bluesky)
2525
Indexes:
2626
PrimaryKey
27-
Keys:
27+
Keys:
2828
data.kind
2929
data.commit.operation
3030
Condition: and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\']))
31-
Parts: 10/10
32-
Granules: 22431/23394
31+
Parts: 30/30
32+
Granules: 16480/17190
3333
------------------------------------------------------------------------------------------------------------------------
3434
Index usage for query Q3:
3535

@@ -42,13 +42,13 @@ Expression (Project names)
4242
ReadFromMergeTree (bluesky_100m_lz4.bluesky)
4343
Indexes:
4444
PrimaryKey
45-
Keys:
45+
Keys:
4646
data.kind
4747
data.commit.operation
4848
data.commit.collection
4949
Condition: and((data.commit.collection in 3-element set), and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\'])))
50-
Parts: 10/10
51-
Granules: 14048/23394
50+
Parts: 30/30
51+
Granules: 10361/17190
5252
------------------------------------------------------------------------------------------------------------------------
5353
Index usage for query Q4:
5454

@@ -62,13 +62,13 @@ Expression (Project names)
6262
ReadFromMergeTree (bluesky_100m_lz4.bluesky)
6363
Indexes:
6464
PrimaryKey
65-
Keys:
65+
Keys:
6666
data.kind
6767
data.commit.operation
6868
data.commit.collection
6969
Condition: and((data.commit.collection in [\'app.bsky.feed.post\', \'app.bsky.feed.post\']), and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\'])))
70-
Parts: 10/10
71-
Granules: 2231/23394
70+
Parts: 30/30
71+
Granules: 1685/17190
7272
------------------------------------------------------------------------------------------------------------------------
7373
Index usage for query Q5:
7474

@@ -82,10 +82,10 @@ Expression (Project names)
8282
ReadFromMergeTree (bluesky_100m_lz4.bluesky)
8383
Indexes:
8484
PrimaryKey
85-
Keys:
85+
Keys:
8686
data.kind
8787
data.commit.operation
8888
data.commit.collection
8989
Condition: and((data.commit.collection in [\'app.bsky.feed.post\', \'app.bsky.feed.post\']), and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\'])))
90-
Parts: 10/10
91-
Granules: 2231/23394
90+
Parts: 30/30
91+
Granules: 1685/17190

clickhouse/results/_index_usage/_m6i.8xlarge_bluesky_100m_zstd.index_usage

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ Expression (Project names)
1010
Indexes:
1111
PrimaryKey
1212
Condition: true
13-
Parts: 10/10
14-
Granules: 23394/23394
13+
Parts: 30/30
14+
Granules: 17190/17190
1515
------------------------------------------------------------------------------------------------------------------------
1616
Index usage for query Q2:
1717

@@ -24,12 +24,12 @@ Expression (Project names)
2424
ReadFromMergeTree (bluesky_100m_zstd.bluesky)
2525
Indexes:
2626
PrimaryKey
27-
Keys:
27+
Keys:
2828
data.kind
2929
data.commit.operation
3030
Condition: and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\']))
31-
Parts: 10/10
32-
Granules: 22431/23394
31+
Parts: 30/30
32+
Granules: 16480/17190
3333
------------------------------------------------------------------------------------------------------------------------
3434
Index usage for query Q3:
3535

@@ -42,13 +42,13 @@ Expression (Project names)
4242
ReadFromMergeTree (bluesky_100m_zstd.bluesky)
4343
Indexes:
4444
PrimaryKey
45-
Keys:
45+
Keys:
4646
data.kind
4747
data.commit.operation
4848
data.commit.collection
4949
Condition: and((data.commit.collection in 3-element set), and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\'])))
50-
Parts: 10/10
51-
Granules: 14048/23394
50+
Parts: 30/30
51+
Granules: 10361/17190
5252
------------------------------------------------------------------------------------------------------------------------
5353
Index usage for query Q4:
5454

@@ -62,13 +62,13 @@ Expression (Project names)
6262
ReadFromMergeTree (bluesky_100m_zstd.bluesky)
6363
Indexes:
6464
PrimaryKey
65-
Keys:
65+
Keys:
6666
data.kind
6767
data.commit.operation
6868
data.commit.collection
6969
Condition: and((data.commit.collection in [\'app.bsky.feed.post\', \'app.bsky.feed.post\']), and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\'])))
70-
Parts: 10/10
71-
Granules: 2231/23394
70+
Parts: 30/30
71+
Granules: 1685/17190
7272
------------------------------------------------------------------------------------------------------------------------
7373
Index usage for query Q5:
7474

@@ -82,10 +82,10 @@ Expression (Project names)
8282
ReadFromMergeTree (bluesky_100m_zstd.bluesky)
8383
Indexes:
8484
PrimaryKey
85-
Keys:
85+
Keys:
8686
data.kind
8787
data.commit.operation
8888
data.commit.collection
8989
Condition: and((data.commit.collection in [\'app.bsky.feed.post\', \'app.bsky.feed.post\']), and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\'])))
90-
Parts: 10/10
91-
Granules: 2231/23394
90+
Parts: 30/30
91+
Granules: 1685/17190

0 commit comments

Comments
 (0)