Skip to content

Conversation

@vitalif
Copy link
Collaborator

@vitalif vitalif commented May 7, 2025

Changelog entry

Implement index-only searches with covering vector indexes (#17770)

Changelog category

  • Improvement

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.

@vitalif vitalif requested review from a team as code owners May 7, 2025 13:49
@vitalif vitalif linked an issue May 7, 2025 that may be closed by this pull request
@github-actions
Copy link

github-actions bot commented May 7, 2025

🟢 2025-05-07 13:51:32 UTC The validation of the Pull Request description is successful.

@github-actions
Copy link

github-actions bot commented May 7, 2025

2025-05-07 13:52:21 UTC Pre-commit check linux-x86_64-release-asan for 60fdd61 has started.
2025-05-07 13:52:32 UTC Artifacts will be uploaded here
2025-05-07 13:55:26 UTC ya make is running...
🔴 2025-05-07 14:05:54 UTC Build failed, see the logs. Also see fail summary

@github-actions
Copy link

github-actions bot commented May 7, 2025

2025-05-07 13:53:17 UTC Pre-commit check linux-x86_64-relwithdebinfo for 60fdd61 has started.
2025-05-07 13:53:24 UTC Artifacts will be uploaded here
2025-05-07 13:56:13 UTC ya make is running...
🔴 2025-05-07 14:04:25 UTC Build failed, see the logs. Also see fail summary

@vitalif vitalif force-pushed the covered-vector-index branch from 654966b to 9e7d893 Compare May 7, 2025 14:22
@github-actions
Copy link

github-actions bot commented May 7, 2025

2025-05-07 14:24:10 UTC Pre-commit check linux-x86_64-relwithdebinfo for 91a341d has started.
2025-05-07 14:24:20 UTC Artifacts will be uploaded here
2025-05-07 14:27:08 UTC ya make is running...

@github-actions
Copy link

github-actions bot commented May 7, 2025

2025-05-07 14:24:10 UTC Pre-commit check linux-x86_64-release-asan for 91a341d has started.
2025-05-07 14:24:22 UTC Artifacts will be uploaded here
2025-05-07 14:27:10 UTC ya make is running...
2025-05-07 15:37:34 UTC Check cancelled

@vitalif vitalif force-pushed the covered-vector-index branch from 9e7d893 to 785c00d Compare May 7, 2025 15:37
@github-actions
Copy link

github-actions bot commented May 7, 2025

2025-05-07 15:52:39 UTC Pre-commit check linux-x86_64-relwithdebinfo for 1f0f95b has started.
2025-05-07 15:52:51 UTC Artifacts will be uploaded here
2025-05-07 15:56:02 UTC ya make is running...
2025-05-07 15:57:17 UTC Check cancelled

@vitalif vitalif force-pushed the covered-vector-index branch from 785c00d to 05ceba5 Compare May 7, 2025 15:56
@github-actions
Copy link

github-actions bot commented May 7, 2025

2025-05-07 15:58:20 UTC Pre-commit check linux-x86_64-release-asan for e4a02be has started.
2025-05-07 15:58:48 UTC Artifacts will be uploaded here
2025-05-07 16:02:14 UTC ya make is running...
2025-05-07 16:08:01 UTC Check cancelled

@vitalif vitalif force-pushed the covered-vector-index branch from 05ceba5 to 4cc4a79 Compare May 7, 2025 16:07
@github-actions
Copy link

github-actions bot commented May 7, 2025

2025-05-07 16:12:00 UTC Pre-commit check linux-x86_64-release-asan for e74d3f6 has started.
2025-05-07 16:12:29 UTC Artifacts will be uploaded here
2025-05-07 16:15:59 UTC ya make is running...
🟡 2025-05-07 17:44:29 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Details

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14367 14196 0 106 40 25

2025-05-07 17:45:45 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-05-07 18:18:43 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Details

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1415 (only retried tests) 1292 0 68 31 24

2025-05-07 18:19:00 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-05-07 18:51:04 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1242 (only retried tests) 1124 0 66 28 24

🟢 2025-05-07 18:51:19 UTC Build successful.
🟢 2025-05-07 18:51:52 UTC ydbd size 3.8 GiB changed* by -15.5 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 0c515e9 merge: e74d3f6 diff diff %
ydbd size 4 126 338 008 Bytes 4 126 322 104 Bytes -15.5 KiB -0.000%
ydbd stripped size 1 432 722 240 Bytes 1 432 721 536 Bytes -704 Bytes -0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@github-actions
Copy link

github-actions bot commented May 7, 2025

2025-05-07 16:17:11 UTC Pre-commit check linux-x86_64-relwithdebinfo for e74d3f6 has started.
2025-05-07 16:18:06 UTC Artifacts will be uploaded here
2025-05-07 16:21:20 UTC ya make is running...
🟡 2025-05-07 17:35:20 UTC Some tests failed, follow the links below. Going to retry failed tests...

Details

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
29353 26644 0 20 2641 48

2025-05-07 17:37:44 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-05-07 18:04:13 UTC Some tests failed, follow the links below. Going to retry failed tests...

Details

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
636 (only retried tests) 580 0 13 10 33

2025-05-07 18:04:23 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-05-07 18:39:35 UTC Some tests failed, follow the links below.

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
155 (only retried tests) 105 0 14 2 34

🟢 2025-05-07 18:39:44 UTC Build successful.
🟢 2025-05-07 18:40:09 UTC ydbd size 2.2 GiB changed* by -17.5 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 0c515e9 merge: e74d3f6 diff diff %
ydbd size 2 346 269 176 Bytes 2 346 251 280 Bytes -17.5 KiB -0.001%
ydbd stripped size 493 370 608 Bytes 493 367 024 Bytes -3.5 KiB -0.001%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@vitalif vitalif force-pushed the covered-vector-index branch from 4cc4a79 to 38c038e Compare May 12, 2025 13:37
@github-actions
Copy link

github-actions bot commented May 12, 2025

2025-05-12 13:40:50 UTC Pre-commit check linux-x86_64-relwithdebinfo for 03ad977 has started.
2025-05-12 13:41:01 UTC Artifacts will be uploaded here
2025-05-12 13:44:05 UTC ya make is running...

@github-actions
Copy link

github-actions bot commented May 12, 2025

2025-05-12 13:41:06 UTC Pre-commit check linux-x86_64-release-asan for 03ad977 has started.
2025-05-12 13:41:18 UTC Artifacts will be uploaded here
2025-05-12 13:44:21 UTC ya make is running...
🟢 2025-05-12 15:24:34 UTC ydbd size 3.9 GiB changed* by -22.0 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: da5cb37 merge: 03ad977 diff diff %
ydbd size 4 137 940 728 Bytes 4 137 918 208 Bytes -22.0 KiB -0.001%
ydbd stripped size 1 435 922 080 Bytes 1 435 917 696 Bytes -4.3 KiB -0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation
2025-05-12 15:24:36 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented May 12, 2025

2025-05-12 15:30:02 UTC Pre-commit check linux-x86_64-relwithdebinfo for be39f83 has started.
2025-05-12 15:30:13 UTC Artifacts will be uploaded here
2025-05-12 15:33:06 UTC ya make is running...
🟡 2025-05-12 16:48:20 UTC Some tests failed, follow the links below. Going to retry failed tests...

Details

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
29362 26666 0 12 2634 50

2025-05-12 16:50:54 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-05-12 17:18:18 UTC Some tests failed, follow the links below. Going to retry failed tests...

Details

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
789 (only retried tests) 740 0 7 8 34

2025-05-12 17:18:30 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-05-12 17:42:58 UTC Some tests failed, follow the links below.

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
141 (only retried tests) 95 0 5 8 33

🟢 2025-05-12 17:43:08 UTC Build successful.
🟢 2025-05-12 17:43:31 UTC ydbd size 2.2 GiB changed* by -16.7 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: a03af29 merge: be39f83 diff diff %
ydbd size 2 351 909 168 Bytes 2 351 892 032 Bytes -16.7 KiB -0.001%
ydbd stripped size 494 236 560 Bytes 494 233 552 Bytes -2.9 KiB -0.001%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@github-actions
Copy link

github-actions bot commented May 12, 2025

2025-05-12 15:30:26 UTC Pre-commit check linux-x86_64-release-asan for be39f83 has started.
2025-05-12 15:30:37 UTC Artifacts will be uploaded here
2025-05-12 15:33:25 UTC ya make is running...
🟡 2025-05-12 16:55:41 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Details

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14521 14355 0 87 51 28

2025-05-12 16:56:57 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-05-12 17:31:54 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Details

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1413 (only retried tests) 1296 0 58 32 27

2025-05-12 17:32:10 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-05-12 18:02:29 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1110 (only retried tests) 1015 0 55 13 27

🟢 2025-05-12 18:02:43 UTC Build successful.
🟢 2025-05-12 18:03:15 UTC ydbd size 3.9 GiB changed* by -17.7 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: a03af29 merge: be39f83 diff diff %
ydbd size 4 137 940 920 Bytes 4 137 922 832 Bytes -17.7 KiB -0.000%
ydbd stripped size 1 435 922 240 Bytes 1 435 918 848 Bytes -3.3 KiB -0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@vitalif vitalif force-pushed the covered-vector-index branch from f28492a to 7cf7b85 Compare May 12, 2025 23:14
@github-actions
Copy link

github-actions bot commented May 12, 2025

2025-05-12 23:17:59 UTC Pre-commit check linux-x86_64-relwithdebinfo for 1c39ae8 has started.
2025-05-12 23:18:10 UTC Artifacts will be uploaded here
2025-05-12 23:21:08 UTC ya make is running...
2025-05-12 23:39:55 UTC Check cancelled

@github-actions
Copy link

github-actions bot commented May 12, 2025

2025-05-12 23:18:08 UTC Pre-commit check linux-x86_64-release-asan for 1c39ae8 has started.
2025-05-12 23:18:20 UTC Artifacts will be uploaded here
2025-05-12 23:21:20 UTC ya make is running...

@vitalif vitalif force-pushed the covered-vector-index branch from 7cf7b85 to d2026ed Compare May 12, 2025 23:39
@github-actions
Copy link

github-actions bot commented May 12, 2025

2025-05-13 09:09:21 UTC Pre-commit check linux-x86_64-release-asan for 6c01c1c has started.
2025-05-13 09:09:32 UTC Artifacts will be uploaded here
2025-05-13 09:12:33 UTC ya make is running...
🟡 2025-05-13 10:41:11 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Details

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14375 14195 0 94 59 27

2025-05-13 10:42:26 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-05-13 11:20:30 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Details

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1642 (only retried tests) 1520 0 60 35 27

2025-05-13 11:20:48 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-05-13 11:52:37 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1287 (only retried tests) 1168 0 58 33 28

🟢 2025-05-13 11:52:52 UTC Build successful.
🟢 2025-05-13 11:53:22 UTC ydbd size 3.9 GiB changed* by -17.6 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 44eee93 merge: 6c01c1c diff diff %
ydbd size 4 137 918 456 Bytes 4 137 900 392 Bytes -17.6 KiB -0.000%
ydbd stripped size 1 435 911 392 Bytes 1 435 908 000 Bytes -3.3 KiB -0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@github-actions
Copy link

github-actions bot commented May 12, 2025

2025-05-13 09:15:40 UTC Pre-commit check linux-x86_64-relwithdebinfo for 6c01c1c has started.
2025-05-13 09:15:50 UTC Artifacts will be uploaded here
2025-05-13 09:18:38 UTC ya make is running...
🟡 2025-05-13 10:42:43 UTC Some tests failed, follow the links below. Going to retry failed tests...

Details

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
29363 26679 0 6 2635 43

2025-05-13 10:45:13 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-05-13 11:09:20 UTC Some tests failed, follow the links below. Going to retry failed tests...

Details

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
303 (only retried tests) 271 0 2 0 30

2025-05-13 11:09:30 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-05-13 11:33:57 UTC Some tests failed, follow the links below.

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
125 (only retried tests) 95 0 1 0 29

🟢 2025-05-13 11:34:04 UTC Build successful.
🟢 2025-05-13 11:34:24 UTC ydbd size 2.2 GiB changed* by -16.7 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 44eee93 merge: 6c01c1c diff diff %
ydbd size 2 351 862 664 Bytes 2 351 845 536 Bytes -16.7 KiB -0.001%
ydbd stripped size 494 228 944 Bytes 494 225 936 Bytes -2.9 KiB -0.001%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@vitalif vitalif force-pushed the covered-vector-index branch from d2026ed to 38c038e Compare May 13, 2025 14:13
@github-actions
Copy link

github-actions bot commented May 13, 2025

2025-05-13 15:01:02 UTC Pre-commit check linux-x86_64-release-asan for 4d0c1d2 has started.
2025-05-13 15:01:42 UTC Artifacts will be uploaded here
2025-05-13 15:04:56 UTC ya make is running...
🟢 2025-05-13 16:31:40 UTC ydbd size 3.9 GiB changed* by +89.6 KiB, which is < 100.0 KiB vs main: OK

ydbd size dash main: 34fb4f1 merge: 4d0c1d2 diff diff %
ydbd size 4 138 092 352 Bytes 4 138 184 128 Bytes +89.6 KiB +0.002%
ydbd stripped size 1 435 960 160 Bytes 1 435 992 576 Bytes +31.7 KiB +0.002%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@github-actions
Copy link

github-actions bot commented May 13, 2025

2025-05-13 15:28:35 UTC Pre-commit check linux-x86_64-relwithdebinfo for 4d0c1d2 has started.
2025-05-13 15:28:56 UTC Artifacts will be uploaded here
2025-05-13 15:32:36 UTC ya make is running...
🟡 2025-05-13 16:45:48 UTC ydbd size 2.2 GiB changed* by +140.3 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: f91acf5 merge: 4d0c1d2 diff diff %
ydbd size 2 351 863 296 Bytes 2 352 006 920 Bytes +140.3 KiB +0.006%
ydbd stripped size 494 229 328 Bytes 494 255 792 Bytes +25.8 KiB +0.005%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@vitalif vitalif force-pushed the covered-vector-index branch from 4e8a35f to 38c038e Compare May 13, 2025 16:55
@github-actions
Copy link

github-actions bot commented May 13, 2025

2025-05-13 16:59:36 UTC Pre-commit check linux-x86_64-relwithdebinfo for 1c725c4 has started.
2025-05-13 16:59:50 UTC Artifacts will be uploaded here
2025-05-13 17:02:40 UTC ya make is running...
🟡 2025-05-13 18:15:09 UTC Some tests failed, follow the links below. Going to retry failed tests...

Details

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
29366 26691 0 5 2632 38

2025-05-13 18:17:45 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-05-13 18:31:09 UTC Tests successful.

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
154 (only retried tests) 116 0 0 8 30

🟢 2025-05-13 18:31:16 UTC Build successful.
🟢 2025-05-13 18:31:38 UTC ydbd size 2.2 GiB changed* by -19.8 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 2f964b1 merge: 1c725c4 diff diff %
ydbd size 2 352 022 696 Bytes 2 352 002 456 Bytes -19.8 KiB -0.001%
ydbd stripped size 494 258 352 Bytes 494 254 896 Bytes -3.4 KiB -0.001%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@github-actions
Copy link

github-actions bot commented May 13, 2025

2025-05-13 17:17:00 UTC Pre-commit check linux-x86_64-release-asan for 1c725c4 has started.
2025-05-13 17:17:27 UTC Artifacts will be uploaded here
2025-05-13 17:20:16 UTC ya make is running...
🟡 2025-05-13 18:45:09 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Details

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14561 14342 0 114 80 25

2025-05-13 18:46:31 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-05-13 19:21:01 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Details

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1412 (only retried tests) 1276 0 82 29 25

2025-05-13 19:21:21 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-05-13 19:49:43 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1214 (only retried tests) 1112 0 56 21 25

🟢 2025-05-13 19:49:57 UTC Build successful.
🟢 2025-05-13 19:50:28 UTC ydbd size 3.9 GiB changed* by -22.1 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 2f964b1 merge: 1c725c4 diff diff %
ydbd size 4 138 199 192 Bytes 4 138 176 544 Bytes -22.1 KiB -0.001%
ydbd stripped size 1 435 994 752 Bytes 1 435 990 272 Bytes -4.4 KiB -0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@MBkkt
Copy link
Contributor

MBkkt commented May 14, 2025

Привет, наверное у вас есть соображения почему стоит сделать так, но не смог пройти мимо.

because they're added in KqpReadTableRanges even if SELECT fields don't contain them.

Там просто код так написан, оно же не required с точки зрения самого запроса и алгоритма.
Просто то что предлагается выглядит несколько печально и не необходимо, так как для каждого префикса, он будет дублироваться во всех листах своего kmeans tree

@vitalif
Copy link
Collaborator Author

vitalif commented May 15, 2025

Там просто код так написан, оно же не required с точки зрения самого запроса и алгоритма. Просто то что предлагается выглядит несколько печально и не необходимо, так как для каждого префикса, он будет дублироваться во всех листах своего kmeans tree

Да, я понял) а если там это запатчить можно по-быстрому - не подскажешь, где? Мне просто показалось, что это довольно глубокая особенность алгоритма исполнения запросов, поэтому я не стал сразу лезть.

Плюс там с покрывающим индексом есть гораздо более печальная штука - в него нужно копировать все embedding векторы, иначе по ним всё равно начинает идти перепроверка и поход в основную таблицу. И на фоне их экономить на префиксе, кажется, уже вообще толку мало...

@vitalif vitalif force-pushed the covered-vector-index branch from 38c038e to 54d191f Compare May 15, 2025 09:33
@github-actions
Copy link

github-actions bot commented May 15, 2025

2025-05-15 09:37:13 UTC Pre-commit check linux-x86_64-release-asan for 6af8696 has started.
2025-05-15 09:37:25 UTC Artifacts will be uploaded here
2025-05-15 09:40:21 UTC ya make is running...
🟡 2025-05-15 11:11:09 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Details

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14393 14222 0 105 38 28

2025-05-15 11:12:34 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-05-15 11:45:46 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Details

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1499 (only retried tests) 1384 0 72 15 28

2025-05-15 11:46:03 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-05-15 12:14:25 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1064 (only retried tests) 949 0 71 20 24

🟢 2025-05-15 12:14:40 UTC Build successful.
🟢 2025-05-15 12:15:10 UTC ydbd size 3.9 GiB changed* by -22.2 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 386cc57 merge: 6af8696 diff diff %
ydbd size 4 139 063 240 Bytes 4 139 040 536 Bytes -22.2 KiB -0.001%
ydbd stripped size 1 436 932 696 Bytes 1 436 928 152 Bytes -4.4 KiB -0.000%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@github-actions
Copy link

github-actions bot commented May 15, 2025

2025-05-15 09:54:55 UTC Pre-commit check linux-x86_64-relwithdebinfo for 6af8696 has started.
2025-05-15 09:55:46 UTC Artifacts will be uploaded here
2025-05-15 09:59:25 UTC ya make is running...
🟡 2025-05-15 11:24:04 UTC Some tests failed, follow the links below. Going to retry failed tests...

Details

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
29414 26720 0 4 2650 40

2025-05-15 11:26:40 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-05-15 11:50:04 UTC Some tests failed, follow the links below. Going to retry failed tests...

Details

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
564 (only retried tests) 527 0 2 3 32

2025-05-15 11:50:15 UTC ya make is running... (failed tests rerun, try 3)
🔴 2025-05-15 12:12:06 UTC Some tests failed, follow the links below.

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
114 (only retried tests) 79 0 1 1 33

🟢 2025-05-15 12:12:13 UTC Build successful.
🟢 2025-05-15 12:12:34 UTC ydbd size 2.2 GiB changed* by -19.8 KiB, which is <= 0 Bytes vs main: OK

ydbd size dash main: 386cc57 merge: 6af8696 diff diff %
ydbd size 2 352 540 536 Bytes 2 352 520 264 Bytes -19.8 KiB -0.001%
ydbd stripped size 494 527 744 Bytes 494 524 224 Bytes -3.4 KiB -0.001%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@vitalif vitalif requested review from gridnevvvit and kungasc May 15, 2025 10:26
@vitalif vitalif force-pushed the covered-vector-index branch from 54d191f to 6227a48 Compare May 15, 2025 13:08
@github-actions
Copy link

github-actions bot commented May 15, 2025

2025-05-15 13:19:00 UTC Pre-commit check linux-x86_64-release-asan for a76f24f has started.
2025-05-15 13:19:34 UTC Artifacts will be uploaded here
2025-05-15 13:23:08 UTC ya make is running...
🟡 2025-05-15 15:06:19 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Details

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
14580 14396 0 99 55 30

2025-05-15 15:07:40 UTC ya make is running... (failed tests rerun, try 2)
🟡 2025-05-15 15:39:48 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet Going to retry failed tests...

Details

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1404 (only retried tests) 1255 0 75 47 27

2025-05-15 15:40:05 UTC ya make is running... (failed tests rerun, try 3)
🟡 2025-05-15 16:11:22 UTC Some tests failed, follow the links below. This fail is not in blocking policy yet

Test history | Ya make output | Test bloat | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
1135 (only retried tests) 1014 0 63 30 28

🟢 2025-05-15 16:11:34 UTC Build successful.
🟡 2025-05-15 16:12:07 UTC ydbd size 3.9 GiB changed* by +348.1 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 386cc57 merge: a76f24f diff diff %
ydbd size 4 139 063 240 Bytes 4 139 419 664 Bytes +348.1 KiB +0.009%
ydbd stripped size 1 436 932 696 Bytes 1 437 075 928 Bytes +139.9 KiB +0.010%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@MBkkt
Copy link
Contributor

MBkkt commented May 15, 2025

Да, я понял) а если там это запатчить можно по-быстрому - не подскажешь, где? Мне просто показалось, что это довольно глубокая особенность алгоритма исполнения запросов, поэтому я не стал сразу лезть.

Понимаю, но в целом есть два варианта запроса:

  1. SELECT prefixed FROM t VIEW i WHERE prefixed = something ORDER BY ...
  2. SELECT covered FROM t VIEW i WHERE prefixed = something ORDER BY ...

Первый действительно сложнее заставить работать, ведь нужно как-то передать данные из скана префикс импл таблицы в результат в конце.
Но с другой стороны в первом варианте пользователь делает довольно бессмысленную штуку, ведь запрос можно переписать на SELECT something FROM t VIEW i WHERE prefixed = something ORDER BY ... (хотя вероятно сделать это в kqp напряжнее, чем добавить колонок в таблицу, но имхо сомнительный запрос by design, можно попросить пользователя писать иначе).

Второй же просто исправить, вот здесь просто сделать новый список колонок в котором оставить только то что написано в select/все кроме prefixed (copy + remove_if для kqp atom list

Плюс там с покрывающим индексом есть гораздо более печальная штука - в него нужно копировать все embedding векторы, иначе по ним всё равно начинает идти перепроверка и поход в основную таблицу. И на фоне их экономить на префиксе, кажется, уже вообще толку мало...

Да. Но не думаю что вектора всегда больше данных, да и к тому же могут быть варианты менее точного индекса.
Которые

  1. не используют embedding в постинге вообще => возвращают вообще все с последнего уровня
  2. используют PQ/SQ для сжатия embedding-ов хранимых внутри постинга => embedding-и начинают занимать меньше места

@github-actions
Copy link

github-actions bot commented May 15, 2025

2025-05-15 15:24:07 UTC Pre-commit check linux-x86_64-relwithdebinfo for a76f24f has started.
2025-05-15 15:24:37 UTC Artifacts will be uploaded here
2025-05-15 15:28:07 UTC ya make is running...
🟡 2025-05-15 17:13:10 UTC Some tests failed, follow the links below. Going to retry failed tests...

Details

Test history | Ya make output | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
29418 26731 0 3 2643 41

2025-05-15 17:15:37 UTC ya make is running... (failed tests rerun, try 2)
🟢 2025-05-15 17:40:28 UTC Tests successful.

Test history | Ya make output | Test bloat | Test bloat

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
289 (only retried tests) 254 0 0 2 33

🟢 2025-05-15 17:40:36 UTC Build successful.
🟡 2025-05-15 17:40:56 UTC ydbd size 2.2 GiB changed* by +172.6 KiB, which is >= 100.0 KiB vs main: Warning

ydbd size dash main: 386cc57 merge: a76f24f diff diff %
ydbd size 2 352 540 536 Bytes 2 352 717 232 Bytes +172.6 KiB +0.008%
ydbd stripped size 494 527 744 Bytes 494 568 960 Bytes +40.2 KiB +0.008%

*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation

@vitalif
Copy link
Collaborator Author

vitalif commented May 15, 2025

Второй же просто исправить, вот здесь просто сделать новый список колонок в котором оставить только то что написано в select/все кроме prefixed (copy + remove_if для kqp atom list

Вот я так и хотел сначала сделать, но потому и написал, что в KqpReadTableRanges, похоже, невозможно отличить колонку, которая использовалась только в фильтре, от колонки, которая использовалась в фильтре и селекте. Т.е. оно пихает в список селекта колонки, по которым только фильтровали. Поэтому чтобы сделать новый список колонок - вроде как надо залезать глубже и делать так, чтобы там было понимание, что в селекте, а что не в селекте.

Причём я хз, может это вообще специально такая логика - ну типа, может, это рассчитано на какие-то сложные варианты запросов типа "select a from table where b >= 1 and b <= 100 and (a+b) > 50" например, т.е. когда условие потом ещё перепроверить нужно. В таком случае колонка b действительно нужна, хотя и используется только в фильтре.) но это просто моё подозрение, тут я не докопался ещё до истины :-).

Ну и в общем, по сути, всё равно это дополнительные оптимизации, которые можно потом доделать. Тут суть просто в том, чтобы разрешить создавать индекс, в который скопирован вектор или префикс, если пользователь так хочет...

@vitalif vitalif merged commit b7d9010 into ydb-platform:main May 19, 2025
15 checks passed
@liruoko liruoko added the changelog/f25-3 PR участвует в списке изменений label Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/f25-3 PR участвует в списке изменений improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Covered vector index search

6 participants