dolt icon indicating copy to clipboard operation
dolt copied to clipboard

Create index considers unnecessary columns

Open timsehn opened this issue 3 months ago • 0 comments

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.

timsehn avatar Apr 02 '24 23:04 timsehn