---
title: "Discussion on \"Column-oriented processing.\" | Hashnode"
description: "Discussion on \"Column-oriented processing.\". Learning from DBMS series."
url: "https://hashnode.com/posts/column-oriented-processing/6081e3bafea38e52a9c59029"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Column-oriented processing.](https://softwarebits.hashnode.dev/column-oriented-processing?utm_source=hashnode&utm_medium=feed)

Learning from DBMS series.

Apr 22, 2021 · 2 min read · softwarebits.hashnode.dev  
Read the article

-   [#performance](https://hashnode.com/tag/performance)
-   [#database](https://hashnode.com/tag/database)
-   [#optimization](https://hashnode.com/tag/optimization)

## Written by

[Taras Tsugrii](https://hashnode.com/@ttsugrii)

@ttsugrii · London, UK

  
[View profile](https://hashnode.com/@ttsugrii)

Software Engineer @ Facebook

## Responses 1

Markdown supported · ⌘↵ to post

[Agshin Guliyev](https://hashnode.com/@action)

[Apr 23, 2021](https://hashnode.com/posts/column-oriented-processing/6081e3bafea38e52a9c59029/comment/60830722ff5fc65284a7891f)

Thanks, Taras, for the article.

I have few questions:

-   How does indexing work in columnar databases? What if I need to query 'Hire\_date' info for Bob and Jim in a huge table. In RDBMS, I could use column index(B tree etc.) to fetch data very quickly.
    
-   You mentioned "array of structs vs. a struct of arrays" for column-based data. IIUC customer has to do proper mapping between columns on the client-side. If you use incorrect indexes to map columns for a specific row, it will introduce hidden bugs that are very difficult to debug. I wonder what is the best practice to fetch column-based data.
    
-   How are join queries performed? What would be the joining criteria?
    

Thanks!

[Taras Tsugrii](https://hashnode.com/@ttsugrii)

[Apr 23, 2021](https://hashnode.com/posts/column-oriented-processing/6081e3bafea38e52a9c59029/comment/60830722ff5fc65284a7891f#reply-608311dfff5fc65284a789c9)

Great questions, Agshin!

-   most columnar DBMSs do not use indexing, since they are focused on OLAP loads where it's common to scan massive amounts of data anyways. At the same time, it's totally possible to use either sort or hash based indexing scheme depending on data cardinality and specific use-case. I actually plan to write about hash-based indexing in one of the future posts.
-   the only advise I have is building hard-to-misuse APIs. For the most part it's possible to hide the difference completely.
-   they are performed in a similar way to row-based DBMSs. Why would the criteria be any different? :)

[db.csail.mit.edu/projects/cstore/abadi-sigmod08.p…](http://db.csail.mit.edu/projects/cstore/abadi-sigmod08.pdf) has more details on indexing and join strategies used in popular solutions.

[Agshin Guliyev](https://hashnode.com/@action)

[Apr 23, 2021](https://hashnode.com/posts/column-oriented-processing/6081e3bafea38e52a9c59029/comment/60830722ff5fc65284a7891f#reply-60834526fea38e52a9c5b0a2)

Thanks for the detailed reply.

In the RDBMS world, SQL joins are very slow for big data, and sometimes the preferred way is to use denormalization to avoid expensive joins. I was wondering how columnar structure deals with big joins.

I am looking forward to reading about hashing-based indexes. It may answer my question regarding optimization of join queries :)
