dolthub / dolthub/dolt

Create index considers unnecessary columns

Open
#7,685 0 comments 0 reactions 1 assignee Claimed by @max-hoffman View on GitHub
bug indexes performance sql
Dominant language
Go
Stars
24.4k
Forks
873
Avg merge
1d 5h
Merged PRs (30d)
108

Description

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.

```go
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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.