1. A computer-implemented method for processing data, comprising: obtaining a set of records, wherein each of the records comprises one or more metrics and at least one dimension associated with the one or more metrics; and creating a data segment from the records by: sorting the records by a primary sort column having a first set of possible values; creating a first forward index for the primary sort column, wherein each row in the first forward index comprises: a unique value found in the primary sort column; a minimum record identifier of a first record containing the unique value; and a maximum record identifier of a last record containing the unique value; and for each column in at least one of the records' remaining columns: creating a dictionary for the column, wherein the dictionary maps unique values in the column to fixed-length encodings of the unique values; and creating a forward index for the column that uses the dictionary to access the unique values in the column with the fixed-length encodings.