# ClickHouse vs Druid: source lines of code compared

The ClickHouse vs Druid comparison on OctoCounts shows side-by-side source line counts for ClickHouse/ClickHouse and apache/druid, counted with the same engine and analysis options on the dates shown in the methodology line: files, total lines, code lines, comment lines, blank lines, and per-language totals, pinned to the exact commits listed below.

As of 2026-09-16, ClickHouse/ClickHouse contains 3,087,049 total lines (2,377,034 code) across 11,093 files, while apache/druid contains 1,192,513 total lines (851,543 code) across 7,071 files as of 2026-09-15. ClickHouse/ClickHouse is about 2.8x the size of apache/druid by code lines. Code size is not code quality: a larger count only means more source material, not a better or worse project.

| Metric | [ClickHouse/ClickHouse](https://octocounts.com/github/ClickHouse/ClickHouse) | [apache/druid](https://octocounts.com/github/apache/druid) |
| --- | ---: | ---: |
| Files | 11,093 | 7,071 |
| Total lines | 3,087,049 | 1,192,513 |
| Code lines | 2,377,034 | 851,543 |
| Comment lines | 277,792 | 224,791 |
| Blank lines | 432,223 | 116,179 |
| Languages counted | 12 | 12 |

Top languages in ClickHouse/ClickHouse: C++ (63.3% of code), C Header (16.9% of code), GNU Style Assembly (11.4% of code). Top languages in apache/druid: Java (76.0% of code), JSON (8.6% of code), TSX (6.0% of code). C++, C Header, GNU Style Assembly, Python, C appear only in ClickHouse/ClickHouse's top languages; Java, JSON, TSX, TypeScript, XML appear only in apache/druid's top languages.

Methodology: both counts come from cached OctoCounts reports generated with tokei. ClickHouse/ClickHouse was counted at ref a38068f43d5a7b76d6463a9ec85f242256a70deb (commit a38068f43d5a) on 2026-09-16; apache/druid was counted at ref e3f06eac3ec902937f72caa31871cf97d5a1df12 (commit e3f06eac3ec9) on 2026-09-15. See the [counting methodology](https://octocounts.com/docs/methodology) for ignored directories and analysis options.
## About this comparison

ClickHouse/ClickHouse counts the ClickHouse repository: the columnar database server, written predominantly in C++, including a contrib/ tree of vendored third-party libraries compiled into the server. apache/druid counts the Druid repository: the distributed analytics datastore, written predominantly in Java, with dependencies pulled at build time rather than vendored in-tree. Both are full database server source trees, counted on the dates shown above.

The per-language tables show the language split directly — C++-dominated on one side, Java-dominated on the other — matching each project's well-known implementation language.

Dependency accounting differs by build tradition: ClickHouse's count includes its vendored contrib/ libraries, while Druid's count covers mostly its own code with external dependencies fetched by its build, so the totals include different amounts of third-party material.

_Server repository size says nothing about query performance, compression, or resource use for a given workload; those are properties of the built system and your schema, not of the source tree's line count._

Sources: [ClickHouse/ClickHouse repository (C++ columnar database server)](https://github.com/ClickHouse/ClickHouse) · [apache/druid repository (Java distributed datastore)](https://github.com/apache/druid). Statements verified 2026-09-16.

Evidence and next steps:

- [ClickHouse/ClickHouse SLOC report](https://octocounts.com/github/ClickHouse/ClickHouse)
- [apache/druid SLOC report](https://octocounts.com/github/apache/druid)
- [Compare ClickHouse/ClickHouse and apache/druid interactively](https://octocounts.com/compare?left=https%3A%2F%2Fgithub.com%2FClickHouse%2FClickHouse&right=https%3A%2F%2Fgithub.com%2Fapache%2Fdruid)

Note: code size is not code quality. OctoCounts only reports reproducible line counts and makes no claim that either project is better.

## Compare FAQ

### Which has more lines of code, ClickHouse/ClickHouse or apache/druid?

ClickHouse/ClickHouse has more code: 2,377,034 code lines versus 851,543 for apache/druid, about 2.8x as much, based on cached OctoCounts reports as of 2026-09-16.

### Does more source lines of code mean more complexity?

Not necessarily. SLOC measures size, not complexity, quality, or maintainability. A larger codebase can mean more features, more generated or vendored code, more verbose language idioms, or more tests — none of which imply the code is harder to work with. Use SLOC to gauge the scale of what you'd be reading or maintaining, not as a quality signal for ClickHouse/ClickHouse, apache/druid, or any repository.

### How is this comparison calculated?

Methodology: both counts come from cached OctoCounts reports generated with tokei. ClickHouse/ClickHouse was counted at ref a38068f43d5a7b76d6463a9ec85f242256a70deb (commit a38068f43d5a) on 2026-09-16; apache/druid was counted at ref e3f06eac3ec902937f72caa31871cf97d5a1df12 (commit e3f06eac3ec9) on 2026-09-15. See the counting methodology for ignored directories and analysis options.

### Can I compare a different branch, tag, or commit?

Yes. This page shows the default branch for each repository. Use the interactive comparison tool to pick any public GitHub repository, branch, tag, or commit SHA for both sides and get a fresh side-by-side report.

## Related OctoCounts pages

- [Interactive repository comparison](https://octocounts.com/compare)
- [Recently analyzed repositories](https://octocounts.com/recent)
- [Popular SLOC reports](https://octocounts.com/popular)
- [Trending GitHub repositories](https://octocounts.com/trending)
- [Hall of Monoliths](https://octocounts.com/hall-of-monoliths)
- [Original research: how filtering changes SLOC counts](https://octocounts.com/research)
- [GitHub SLOC counter guide](https://octocounts.com/docs/github-sloc-counter)
- [Counting methodology](https://octocounts.com/docs/methodology)
- [SLOC and code metrics glossary](https://octocounts.com/docs/glossary)
- [OctoCounts API docs](https://octocounts.com/docs/api)
