Clickhouse.Pure.Grpc 2.3.1

dotnet add package Clickhouse.Pure.Grpc --version 2.3.1
                    
NuGet\Install-Package Clickhouse.Pure.Grpc -Version 2.3.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Clickhouse.Pure.Grpc" Version="2.3.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Clickhouse.Pure.Grpc" Version="2.3.1" />
                    
Directory.Packages.props
<PackageReference Include="Clickhouse.Pure.Grpc" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Clickhouse.Pure.Grpc --version 2.3.1
                    
#r "nuget: Clickhouse.Pure.Grpc, 2.3.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Clickhouse.Pure.Grpc@2.3.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Clickhouse.Pure.Grpc&version=2.3.1
                    
Install as a Cake Addin
#tool nuget:?package=Clickhouse.Pure.Grpc&version=2.3.1
                    
Install as a Cake Tool

<h1 align="center">ClickHouse Pure C# Client</h1>

Unofficial, simple and efficient driver for Clickhouse. Less memory allocations, native data format, column oriented API.

Currently, in the early stage of development.

<br/>

<p align="center"> <a href="https://www.nuget.org/packages/Clickhouse.Pure.Grpc"> <img alt="NuGet Version" src="https://img.shields.io/nuget/v/Clickhouse.Pure.Grpc"> </a>

<a href="https://www.nuget.org/packages/Clickhouse.Pure.Grpc"> <img alt="NuGet Downloads" src="https://img.shields.io/nuget/dt/Clickhouse.Pure.Grpc"> </a>

<a href="https://github.com/egbaydarov/clickhouse-pure-csharp/actions/workflows/tests.yaml"> <img src="https://github.com/egbaydarov/clickhouse-pure-csharp/actions/workflows/tests.yaml/badge.svg?branch=main"> </a>

<a href="https://codecov.io/gh/egbaydarov/clickhouse-pure-csharp" > <img src="https://codecov.io/gh/egbaydarov/clickhouse-pure-csharp/graph/badge.svg?token=VS1YDF9ICO"/> </a>

Why this exists

In my experience, ClickHouse.Client and its successor still carry too much legacy .NET slop. ORM? ADO? These abstractions don’t add much value for ClickHouse in 2025+. Their APIs make efficient data ingestion less obvious, and I’ve seen unnecessary heap churn and overly defensive code trying to support every platform.

I personally prefer paradigm of clickhouse-go - it feels simpler, faster, and more aligned with ClickHouse itself.

This project aims to be intentionally minimal yet powerful for modern .NET apps. That’s just my take, though - if the existing drivers work well for you, use what fits best.

Under the hood

  • Uses gRPC and Protobuf to pack and ship data to the ClickHouse server. (The .NET gRPC client feels much thinner than plain HTTP, and the protocol design still gives the same wins.)
  • More column-oriented API that lets you build column arrays in a buffer and send them to the server with as few copies as possible. (Not perfect yet, but it already outperforms the official ClickHouse driver.)
  • ArrayPool to cut allocations (plays nicely with the internal allocation strategy in the gRPC .NET clients).
  • Ready and tested with .NET AOT.

Warning: For anyone who accidentally lands on this driver: parts of this codebase were vibecoded (written fast and loose). There are probably bugs. Don't blindly deploy this to production without thorough testing in your own environment. Run your own tests, benchmark your workloads, and make sure it actually works for your use case first. The API may also change significantly in future versions

Performance

This driver is fast. Like, really fast compared to the official one. (From x3 to x10 depending on data type and row count.)

Check out more detailed benchmark results in the Single Column Table and Complex Table.

Stuff to Make Better

  • (WIP) General refactoring (trim vibecode artifacts and make the API more straightforward).
  • Generate tests from templates instead of hand-rolling them.
  • Use bare TCP instead of gRPC (gRPC is temporary to save time), which should give a boost and let manage memory with arenas.
  • More type support (right now only what I personally need is implemented).
  • More hot-path optimizations and profiling.
  • Code generation to reduce boilerplate code on serialization (kinda similar to System.Text.Json).
  • Documentation

Supported Types

The full mapping table lives in TYPES.md.

Usage Examples

All the code samples is here USAGE.md.

ClickHouse Versions

This driver should work with any ClickHouse version that's currently receiving updates.

Check ClickHouse's page for the list of supported versions.

Credits

Big thanks to the ClickHouse Go driver team - learned a lot from their native format implementation.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.3.1 781 12/15/2025
2.2.30 447 12/9/2025
2.2.29 604 12/8/2025
2.2.28 186 12/5/2025
2.2.25 469 11/25/2025
Loading failed