dolt
dolt copied to clipboard
Create index considers unnecessary columns
A customer had a large table that had a text
column in it. When creating an index it took multiple days because it was round tripping to get the text
column even though it didn't need it.
for {
k, v, err := iter.Next(ctx)
idxKey, err := secondaryBld.SecondaryKeyFromRow(ctx, k, v)
if err != nil {
return nil, err
}
if err = mut.Put(ctx, idxKey, val.EmptyTuple); err != nil {
return nil, err
}
}
We should only fetch the columns we need for the index.