I see that the following code is used in order to create an index:

      for (Iterator<IColumn> it = columns.iterator(); it.hasNext();)
        {
            column = it.next();
            if (firstColumn == null)
            {
                firstColumn = column;
                startPosition = endPosition;
            }
            endPosition += column.serializedSize();
            /* if we hit the column index size that we have to index
after, go ahead and index it. */
            if (endPosition - startPosition >=
DatabaseDescriptor.getColumnIndexSize())
            {
                IndexHelper.IndexInfo cIndexInfo = new
IndexHelper.IndexInfo(firstColumn.name(), column.name(),
startPosition, endPosition - startPosition);
                indexList.add(cIndexInfo);
                indexSizeInBytes += cIndexInfo.serializedSize();
                firstColumn = null;
            }
        }

According to this code the name of the first column is stored numerous
times which can be very expensive in a large rows. I think that a
better implementation is to have an Index Header that in turn will
contain the name of the first column.
Are there any plans to change this implementation? Is anyone aware of
an open issue for it?

Reply via email to