Usman Saleem
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    <h1>Columnar Databases: How They Work, When to Use Them, and How to Choose</h1> <p>Columnar databases have become a foundational technology for modern analytics systems. If you’re dealing with large datasets, complex aggregations, or user-facing analytics that must respond in milliseconds, chances are you’ve already encountered—or need—a columnar database.</p> <p>This article explains what columnar databases are, how they work under the hood, where they shine, where they fall short, and how to choose the right one for your workload.</p> <h2>Understanding Columnar Databases</h2> <p>A <b><a href="https://www.velodb.io/glossary/columnar-database" target="_blank"> columnar database </a></b>. stores data by column rather than by row. Instead of placing all fields of a single record together, it stores all values of the same column contiguously.</p> <p>This design is optimized for analytical queries, where you typically scan large numbers of rows but only touch a small subset of columns—such as computing totals, averages, or trends across millions of records.</p> <p><strong>The key idea is simple:</strong><br> Most analytical queries don’t need full rows—they need specific columns at scale.</p> <h2>Columnar Storage vs Row-Based Storage</h2> <p>The difference between columnar and row-oriented databases becomes clear when you look at access patterns.</p> <p>Row-oriented systems (like PostgreSQL or MySQL) store records row by row. This layout is ideal for transactional workloads where you frequently read or update entire records by primary key.</p> <p>Columnar systems flip this model. They are optimized for:</p> <ul> <li>Scanning large datasets</li> <li>Aggregating over time ranges</li> <li>Filtering across multiple dimensions</li> <li>Serving analytical queries with low latency</li> </ul> <p>In practice, this means columnar databases trade write and update flexibility for dramatically faster reads and better compression—a trade-off that makes sense for analytics-heavy workloads.</p> <h2>How Columnar Databases Actually Work</h2> <p>Columnar performance is not just about storage layout. Several techniques work together under the hood.</p> <h3>Column-Based Storage and I/O Reduction</h3> <p>Because each column is stored separately, queries read only the columns they need. If your query touches 3 columns out of 100, the database avoids scanning the remaining 97 entirely. This reduces disk I/O by orders of magnitude.</p> <h3>Vectorized Execution</h3> <p>Instead of processing rows one by one, columnar databases operate on batches of values at once. This aligns with modern CPU architectures and allows a single instruction to process many values in parallel.</p> <h3>Compression and Encoding</h3> <p>Columnar data compresses extremely well. Techniques like dictionary encoding, run-length encoding, and bit packing often achieve 5–10× compression, sometimes more for low-cardinality fields.</p> <h3>Late Materialization</h3> <p>Rows are reconstructed only at the final stage of a query. Intermediate steps operate on compressed column data, minimizing memory usage and unnecessary work.</p> <p>Together, these mechanisms explain why columnar databases can scan billions of rows in seconds—or less.</p> <h2>Why Teams Use Columnar Databases</h2> <p>Columnar databases are widely adopted because they unlock capabilities that are difficult or expensive to achieve with row stores.</p> <p>They excel at:</p> <ul> <li>Fast analytical queries over large datasets</li> <li>High-concurrency read workloads</li> <li>Cost-efficient storage due to compression</li> <li>Real-time or near-real-time analytics</li> <li>Supporting dashboards and interactive exploration</li> </ul> <p>For customer-facing analytics, observability backends, and operational intelligence systems, these characteristics are often non-negotiable.</p> <h2>Trade-offs and Limitations</h2> <p>Columnar databases are powerful, but they are not universal solutions.</p> <p>You should be cautious if your workload involves:</p> <ul> <li>High-frequency single-row updates</li> <li>Heavy transactional consistency requirements</li> <li>Small datasets where operational overhead dominates</li> <li>Latency-sensitive point lookups as the primary access pattern</li> </ul> <p>Some modern systems mitigate these limitations with hybrid storage or optimized update paths, but the core design remains analytics-first.</p> <h2>Where Columnar Databases Are Commonly Used</h2> <p>In practice, columnar databases appear in several recurring scenarios:</p> <ul> <li>Business intelligence and reporting, where queries scan large historical datasets</li> <li>Real-time analytics, where fresh data must be queried seconds after ingestion</li> <li>Customer-facing analytics, where thousands of users query dashboards concurrently</li> <li>Log and event analytics, involving high-cardinality, append-only data</li> <li>Observability and telemetry analysis, where fast slicing and correlation matter</li> </ul> <p>These use cases share one thing in common: read-heavy analytical workloads at scale.</p> <h2>Popular Columnar Database Options</h2> <p>The ecosystem includes both open-source and commercial systems, each with different strengths:</p> <ul> <li>Some prioritize ultra-fast single-node performance</li> <li>Others focus on cloud-native scalability</li> <li>Some emphasize ease of use and SQL compatibility</li> <li>Others specialize in streaming or real-time ingestion</li> </ul> <p>Systems built on Apache Doris—such as <b><a href="https://www.velodb.io/" target="_blank"> VeloDB </a></b>.—are often chosen when teams need real-time analytics with high concurrency, strong SQL support, and efficient handling of semi-structured data alongside traditional relational schemas.</p> <p>In those scenarios, columnar storage is not just a performance optimization; it becomes a foundation for interactive, production-facing analytics.</p> <h2>How to Choose a Columnar Database</h2> <p>Choosing the right columnar database depends less on benchmarks and more on architectural fit.</p> <p>Key questions to ask include:</p> <ul> <li>How fresh does the data need to be?</li> <li>How many concurrent queries will you serve?</li> <li>Do you need standard SQL compatibility?</li> <li>How important is schema flexibility?</li> <li>Are you optimizing for cost, latency, or operational simplicity?</li> </ul> <p>For teams building analytics systems that power real products—not just offline reports—systems like VeloDB are often evaluated because they combine columnar performance with real-time ingestion and high-concurrency serving.</p> <h2>Final Thoughts</h2> <p>Columnar databases are not just faster databases—they enable a different way of working with data. By aligning storage, execution, and compression with analytical access patterns, they make large-scale analysis practical, interactive, and cost-efficient.</p> <p>If your system depends on understanding patterns across large datasets—especially in real time—a columnar database is often the right foundation. The key is choosing one that matches your workload today while scaling with your needs tomorrow.</p>

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully