We know that in traditional tables (heap) and indexes (B-tree), SQL stores data in pages which is in a row based style. This type of storage model known as a row store. But in Columnstore index, it is like turning the traditional storage model to 90 degrees, where all the values from a single column are stored continuously in a compressed form. The Columnstore index stores each column in a separate set of disk pages rather than storing multiple rows per page, which has been the traditional storage format. With the help of an example, we will see the differences.
TABLE 1: Traditional Table Containing Employee Data
| EmployeeID | EmpName | EmpCity | EmpState |
| 1 | John | New York | NY |
| 2 | Mary | New Jersey | NJ |
| 3 | Simon | New York | NY |
| 4 | Joy | New York | NY |
| 5 | Ronald | New Jersey | NJ |

Join the conversation! Your thoughts help the community grow.