The document discusses different types of indexes that can be used for columnar data, including inverted indexes and forward indexes. It explains that inverted indexes are cheap to store if the column is sorted, as each unique value only needs to be stored once along with its positions. Forward indexes require storing a mapping from unique values to their IDs. This mapping can be compressed using dictionary compression or fixed bit encoding to reduce the space needed. In real use cases, Pinot is able to compress indexes to require only 16 bytes per document while other systems may use over 100 bytes, allowing Pinot to store 7 times more documents in memory.