-
Notifications
You must be signed in to change notification settings - Fork 741
Implement index-only searches with covering vector indexes (#17770) #18137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
🟢 |
|
⚪ |
|
⚪ |
654966b to
9e7d893
Compare
9e7d893 to
785c00d
Compare
785c00d to
05ceba5
Compare
05ceba5 to
4cc4a79
Compare
|
⚪ DetailsTest history | Ya make output | Test bloat
⚪ DetailsTest history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ DetailsTest history | Ya make output | Test bloat
⚪ DetailsTest history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
4cc4a79 to
38c038e
Compare
|
⚪
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ DetailsTest history | Ya make output | Test bloat
⚪ DetailsTest history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ DetailsTest history | Ya make output | Test bloat
⚪ DetailsTest history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
f28492a to
7cf7b85
Compare
7cf7b85 to
d2026ed
Compare
|
⚪ DetailsTest history | Ya make output | Test bloat
⚪ DetailsTest history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ DetailsTest history | Ya make output | Test bloat
⚪ DetailsTest history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
d2026ed to
38c038e
Compare
|
⚪
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
4e8a35f to
38c038e
Compare
|
⚪ DetailsTest history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ DetailsTest history | Ya make output | Test bloat
⚪ DetailsTest history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
Привет, наверное у вас есть соображения почему стоит сделать так, но не смог пройти мимо.
Там просто код так написан, оно же не required с точки зрения самого запроса и алгоритма. |
Да, я понял) а если там это запатчить можно по-быстрому - не подскажешь, где? Мне просто показалось, что это довольно глубокая особенность алгоритма исполнения запросов, поэтому я не стал сразу лезть. Плюс там с покрывающим индексом есть гораздо более печальная штука - в него нужно копировать все embedding векторы, иначе по ним всё равно начинает идти перепроверка и поход в основную таблицу. И на фоне их экономить на префиксе, кажется, уже вообще толку мало... |
38c038e to
54d191f
Compare
|
⚪ DetailsTest history | Ya make output | Test bloat
⚪ DetailsTest history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
|
⚪ DetailsTest history | Ya make output | Test bloat
⚪ DetailsTest history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
54d191f to
6227a48
Compare
|
⚪ DetailsTest history | Ya make output | Test bloat
⚪ DetailsTest history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
Понимаю, но в целом есть два варианта запроса:
Первый действительно сложнее заставить работать, ведь нужно как-то передать данные из скана префикс импл таблицы в результат в конце. Второй же просто исправить, вот здесь просто сделать новый список колонок в котором оставить только то что написано в select/все кроме prefixed (copy + remove_if для kqp atom list
Да. Но не думаю что вектора всегда больше данных, да и к тому же могут быть варианты менее точного индекса.
|
|
⚪ DetailsTest history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
Вот я так и хотел сначала сделать, но потому и написал, что в KqpReadTableRanges, похоже, невозможно отличить колонку, которая использовалась только в фильтре, от колонки, которая использовалась в фильтре и селекте. Т.е. оно пихает в список селекта колонки, по которым только фильтровали. Поэтому чтобы сделать новый список колонок - вроде как надо залезать глубже и делать так, чтобы там было понимание, что в селекте, а что не в селекте. Причём я хз, может это вообще специально такая логика - ну типа, может, это рассчитано на какие-то сложные варианты запросов типа "select a from table where b >= 1 and b <= 100 and (a+b) > 50" например, т.е. когда условие потом ещё перепроверить нужно. В таком случае колонка b действительно нужна, хотя и используется только в фильтре.) но это просто моё подозрение, тут я не докопался ещё до истины :-). Ну и в общем, по сути, всё равно это дополнительные оптимизации, которые можно потом доделать. Тут суть просто в том, чтобы разрешить создавать индекс, в который скопирован вектор или префикс, если пользователь так хочет... |
Changelog entry
Implement index-only searches with covering vector indexes (#17770)
Changelog category
Description for reviewers
Vector indexes already allowed to add the embedding column as a data column, now they also allow to add prefix columns as data columns, because they're actually always required for index-only searches because they're added in KqpReadTableRanges even if SELECT fields don't contain them.