Skip to content
Merged
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
7 changes: 1 addition & 6 deletions clickhouse/benchmark.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

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

# Arguments
DB_NAME="$1"
RESULT_FILE_RUNTIMES="$2"
RESULT_FILE_MEMORY_USAGE="$3"

# Construct the query log file name using $DB_NAME
QUERY_LOG_FILE="_query_log_${DB_NAME}.txt"
Expand Down Expand Up @@ -44,7 +43,3 @@ MEMORY_RESULTS=$(grep -E '^[0-9]' "$QUERY_LOG_FILE" | awk 'NR % 2 == 0' | awk '{
# Output the runtime results
echo "$RUNTIME_RESULTS" > "$RESULT_FILE_RUNTIMES"
echo "Runtime results written to $RESULT_FILE_RUNTIMES"

# Output the memory usage results
echo "$MEMORY_RESULTS" > "$RESULT_FILE_MEMORY_USAGE"
echo "Memory usage results written to $RESULT_FILE_MEMORY_USAGE"
2 changes: 1 addition & 1 deletion clickhouse/main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ benchmark() {
#./query_results.sh "bluesky_${size}m_${suffix}" | tee "${OUTPUT_PREFIX}_bluesky_${size}m_${suffix}.query_results"
./index_usage.sh "bluesky_${size}m_${suffix}" | tee "${OUTPUT_PREFIX}_bluesky_${size}m_${suffix}.index_usage"
./physical_query_plans.sh "bluesky_${size}m_${suffix}" | tee "${OUTPUT_PREFIX}_bluesky_${size}m_${suffix}.physical_query_plans"
./benchmark.sh "bluesky_${size}m_${suffix}" "${OUTPUT_PREFIX}_bluesky_${size}m_${suffix}.results_runtime" "${OUTPUT_PREFIX}_bluesky_${size}m_${suffix}.results_memory_usage"
./benchmark.sh "bluesky_${size}m_${suffix}" "${OUTPUT_PREFIX}_bluesky_${size}m_${suffix}.results_runtime"
./drop_table.sh # also stops ClickHouse
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Expression (Project names)
Indexes:
PrimaryKey
Condition: true
Parts: 30/30
Granules: 567190/567190
Parts: 99/99
Granules: 356251/356251
------------------------------------------------------------------------------------------------------------------------
Index usage for query Q2:

Expand All @@ -24,12 +24,12 @@ Expression (Project names)
ReadFromMergeTree (bluesky_1000m_lz4.bluesky)
Indexes:
PrimaryKey
Keys:
Keys:
data.kind
data.commit.operation
Condition: and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\']))
Parts: 30/30
Granules: 537850/567190
Parts: 99/99
Granules: 338299/356251
------------------------------------------------------------------------------------------------------------------------
Index usage for query Q3:

Expand All @@ -42,13 +42,13 @@ Expression (Project names)
ReadFromMergeTree (bluesky_1000m_lz4.bluesky)
Indexes:
PrimaryKey
Keys:
Keys:
data.kind
data.commit.operation
data.commit.collection
Condition: and((data.commit.collection in 3-element set), and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\'])))
Parts: 30/30
Granules: 352926/567190
Parts: 99/99
Granules: 223569/356251
------------------------------------------------------------------------------------------------------------------------
Index usage for query Q4:

Expand All @@ -62,13 +62,13 @@ Expression (Project names)
ReadFromMergeTree (bluesky_1000m_lz4.bluesky)
Indexes:
PrimaryKey
Keys:
Keys:
data.kind
data.commit.operation
data.commit.collection
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\'])))
Parts: 30/30
Granules: 54185/567190
Parts: 94/94
Granules: 35156/356389
------------------------------------------------------------------------------------------------------------------------
Index usage for query Q5:

Expand All @@ -82,10 +82,10 @@ Expression (Project names)
ReadFromMergeTree (bluesky_1000m_lz4.bluesky)
Indexes:
PrimaryKey
Keys:
Keys:
data.kind
data.commit.operation
data.commit.collection
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\'])))
Parts: 30/30
Granules: 54185/567190
Parts: 94/94
Granules: 35156/356389
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ Expression (Project names)
Expression ((Before ORDER BY + Projection))
Aggregating
Expression ((Before GROUP BY + Change column names to column identifiers))
ReadFromMergeTree (bluesky_100m_zstd.bluesky)
ReadFromMergeTree (bluesky_1000m_zstd.bluesky)
Indexes:
PrimaryKey
Condition: true
Parts: 10/10
Granules: 23394/23394
Parts: 99/99
Granules: 356251/356251
------------------------------------------------------------------------------------------------------------------------
Index usage for query Q2:

Expand All @@ -21,15 +21,15 @@ Expression (Project names)
Aggregating
Expression (Before GROUP BY)
Filter ((WHERE + Change column names to column identifiers))
ReadFromMergeTree (bluesky_100m_zstd.bluesky)
ReadFromMergeTree (bluesky_1000m_zstd.bluesky)
Indexes:
PrimaryKey
Keys:
Keys:
data.kind
data.commit.operation
Condition: and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\']))
Parts: 10/10
Granules: 22431/23394
Parts: 99/99
Granules: 338299/356251
------------------------------------------------------------------------------------------------------------------------
Index usage for query Q3:

Expand All @@ -39,16 +39,16 @@ Expression (Project names)
Aggregating
Expression (Before GROUP BY)
Filter ((WHERE + Change column names to column identifiers))
ReadFromMergeTree (bluesky_100m_zstd.bluesky)
ReadFromMergeTree (bluesky_1000m_zstd.bluesky)
Indexes:
PrimaryKey
Keys:
Keys:
data.kind
data.commit.operation
data.commit.collection
Condition: and((data.commit.collection in 3-element set), and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\'])))
Parts: 10/10
Granules: 14048/23394
Parts: 99/99
Granules: 223569/356251
------------------------------------------------------------------------------------------------------------------------
Index usage for query Q4:

Expand All @@ -59,16 +59,16 @@ Expression (Project names)
Aggregating
Expression (Before GROUP BY)
Filter ((WHERE + Change column names to column identifiers))
ReadFromMergeTree (bluesky_100m_zstd.bluesky)
ReadFromMergeTree (bluesky_1000m_zstd.bluesky)
Indexes:
PrimaryKey
Keys:
Keys:
data.kind
data.commit.operation
data.commit.collection
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\'])))
Parts: 10/10
Granules: 2231/23394
Parts: 99/99
Granules: 35131/356251
------------------------------------------------------------------------------------------------------------------------
Index usage for query Q5:

Expand All @@ -79,13 +79,13 @@ Expression (Project names)
Aggregating
Expression (Before GROUP BY)
Filter ((WHERE + Change column names to column identifiers))
ReadFromMergeTree (bluesky_100m_zstd.bluesky)
ReadFromMergeTree (bluesky_1000m_zstd.bluesky)
Indexes:
PrimaryKey
Keys:
Keys:
data.kind
data.commit.operation
data.commit.collection
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\'])))
Parts: 10/10
Granules: 2231/23394
Parts: 99/99
Granules: 35131/356251
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Expression (Project names)
Indexes:
PrimaryKey
Condition: true
Parts: 10/10
Granules: 23394/23394
Parts: 30/30
Granules: 17190/17190
------------------------------------------------------------------------------------------------------------------------
Index usage for query Q2:

Expand All @@ -24,12 +24,12 @@ Expression (Project names)
ReadFromMergeTree (bluesky_100m_lz4.bluesky)
Indexes:
PrimaryKey
Keys:
Keys:
data.kind
data.commit.operation
Condition: and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\']))
Parts: 10/10
Granules: 22431/23394
Parts: 30/30
Granules: 16480/17190
------------------------------------------------------------------------------------------------------------------------
Index usage for query Q3:

Expand All @@ -42,13 +42,13 @@ Expression (Project names)
ReadFromMergeTree (bluesky_100m_lz4.bluesky)
Indexes:
PrimaryKey
Keys:
Keys:
data.kind
data.commit.operation
data.commit.collection
Condition: and((data.commit.collection in 3-element set), and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\'])))
Parts: 10/10
Granules: 14048/23394
Parts: 30/30
Granules: 10361/17190
------------------------------------------------------------------------------------------------------------------------
Index usage for query Q4:

Expand All @@ -62,13 +62,13 @@ Expression (Project names)
ReadFromMergeTree (bluesky_100m_lz4.bluesky)
Indexes:
PrimaryKey
Keys:
Keys:
data.kind
data.commit.operation
data.commit.collection
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\'])))
Parts: 10/10
Granules: 2231/23394
Parts: 30/30
Granules: 1685/17190
------------------------------------------------------------------------------------------------------------------------
Index usage for query Q5:

Expand All @@ -82,10 +82,10 @@ Expression (Project names)
ReadFromMergeTree (bluesky_100m_lz4.bluesky)
Indexes:
PrimaryKey
Keys:
Keys:
data.kind
data.commit.operation
data.commit.collection
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\'])))
Parts: 10/10
Granules: 2231/23394
Parts: 30/30
Granules: 1685/17190
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Expression (Project names)
Indexes:
PrimaryKey
Condition: true
Parts: 10/10
Granules: 23394/23394
Parts: 30/30
Granules: 17190/17190
------------------------------------------------------------------------------------------------------------------------
Index usage for query Q2:

Expand All @@ -24,12 +24,12 @@ Expression (Project names)
ReadFromMergeTree (bluesky_100m_zstd.bluesky)
Indexes:
PrimaryKey
Keys:
Keys:
data.kind
data.commit.operation
Condition: and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\']))
Parts: 10/10
Granules: 22431/23394
Parts: 30/30
Granules: 16480/17190
------------------------------------------------------------------------------------------------------------------------
Index usage for query Q3:

Expand All @@ -42,13 +42,13 @@ Expression (Project names)
ReadFromMergeTree (bluesky_100m_zstd.bluesky)
Indexes:
PrimaryKey
Keys:
Keys:
data.kind
data.commit.operation
data.commit.collection
Condition: and((data.commit.collection in 3-element set), and((data.commit.operation in [\'create\', \'create\']), (data.kind in [\'commit\', \'commit\'])))
Parts: 10/10
Granules: 14048/23394
Parts: 30/30
Granules: 10361/17190
------------------------------------------------------------------------------------------------------------------------
Index usage for query Q4:

Expand All @@ -62,13 +62,13 @@ Expression (Project names)
ReadFromMergeTree (bluesky_100m_zstd.bluesky)
Indexes:
PrimaryKey
Keys:
Keys:
data.kind
data.commit.operation
data.commit.collection
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\'])))
Parts: 10/10
Granules: 2231/23394
Parts: 30/30
Granules: 1685/17190
------------------------------------------------------------------------------------------------------------------------
Index usage for query Q5:

Expand All @@ -82,10 +82,10 @@ Expression (Project names)
ReadFromMergeTree (bluesky_100m_zstd.bluesky)
Indexes:
PrimaryKey
Keys:
Keys:
data.kind
data.commit.operation
data.commit.collection
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\'])))
Parts: 10/10
Granules: 2231/23394
Parts: 30/30
Granules: 1685/17190
Loading