Skip to content

Conversation

Copy link

Copilot AI commented Nov 5, 2025

Implements a production-ready benchmark suite with 41 SQL queries across 5 categories to test Databend performance on diverse workloads.

Benchmark Categories

  • TPC-H (6 queries): Industry-standard decision support queries testing complex aggregations, multi-table joins, and subqueries
  • ClickBench (8 queries): Analytical queries on web analytics schema with 100+ columns
  • Basic CRUD (10 queries): INSERT/SELECT/UPDATE/DELETE operations, both single-row and bulk
  • Aggregation & JOINs (9 queries): Complex analytical queries with GROUP BY, HAVING, INNER/LEFT JOIN on 100K+ rows
  • Time-Series (6 queries): Time windowing, moving averages, LAG/LEAD window functions on 1M+ rows

Implementation Details

Each category includes:

  • setup.sql - Creates schema and generates sample data using numbers() function (no external files)
  • Query files (q1.sql, q2.sql, etc.) with inline documentation
  • README.md with usage instructions and performance considerations

Automation

run_benchmark.sh provides:

  • CLI configurability (--cli bendsql or databend-query)
  • Execution modes: all benchmarks, specific category, setup-only, single query
  • Cross-platform timing with nanosecond precision where supported
  • CSV result tracking with query name and duration
  • Environment variable overrides for host/port/user

Usage

# Run all benchmarks
./run_benchmark.sh --all

# Run specific category
./run_benchmark.sh --benchmark tpch

# Custom configuration
DATABEND_CLI=bendsql ./run_benchmark.sh --benchmark aggregation --host prod.databend.io

Results written to benchmark_results.csv for analysis.

Original prompt

databend benchmark sql scripts


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 6 commits November 5, 2025 03:32
Co-authored-by: BohuTANG <172204+BohuTANG@users.noreply.github.com>
Co-authored-by: BohuTANG <172204+BohuTANG@users.noreply.github.com>
Co-authored-by: BohuTANG <172204+BohuTANG@users.noreply.github.com>
Co-authored-by: BohuTANG <172204+BohuTANG@users.noreply.github.com>
Co-authored-by: BohuTANG <172204+BohuTANG@users.noreply.github.com>
Co-authored-by: BohuTANG <172204+BohuTANG@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Databend benchmark SQL scripts Add comprehensive SQL benchmark suite for Databend Nov 5, 2025
Copilot AI requested a review from BohuTANG November 5, 2025 03:45
Copilot finished work on behalf of BohuTANG November 5, 2025 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants