4 ms·
Possibly naive question, but isn't an index (in a classical relational database) the same as a column store?
by rwmj 9y ago
Possibly naive question, but isn't an index (in a classical relational database) the same as a column store?
- setr 9y agoAn index stores pointers to rows based on the column value; the values are still stored as rows though. So when you query on an indexed column, you'll have contiguous access on the index, but the rows themselves may be stored on disk based on a different column (so you'll could get the row pointers for a range query in one go from the index but fetching the rows would be random lookups). But if you want to view an entire row, its trivial, because the full row data is contiguous on disk. Column store groups the table values by the column, so the values of col A will be contigous, and col B will be contiguous, (but not pairwise!) but if you want to view the entire row, you'll probably have to do 2 lookups in random locations. But the range query on col A, selecting only col A, becomes a trivial fetch. Thats my understanding anyways
- asavinov 9y agoAn index for a column-store and row-store is (conceptually) the same. Why is different is 1. How data is represented. A database is a collection of column objects. For example, it is easy to create a column or delete a column. 2. How data is being processed (queried). The engine processes columns as objected managed by the system