Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
11.7(EOL)
-
None
Description
I had it in sign-off notes for MDEV-35450, but not as a JIRA item, but I think selecting from a view is a fairly realistic scenario and deserves at least being documented as a limitation if it hasn't been yet.
create table t (b vector(1) not null, vector(b)); |
insert into t values (0x31313131),(0x32323232); |
create view v as select * from t; |
explain select * from t order by vec_distance_euclidean(b,0x30303030) limit 1; |
explain select * from v order by vec_distance_euclidean(b,0x30303030) limit 1; |
explain select * from (select * from t) sq order by vec_distance_euclidean(b,0x30303030) limit 1; |
drop view v; |
drop table t; |
11.7 bc32705f46fa93d9700a20c8d439e48e5c352272 |
create view v as select * from t; |
explain select * from t order by vec_distance_euclidean(b,0x30303030) limit 1; |
id select_type table type possible_keys key key_len ref rows Extra |
1 SIMPLE t index NULL b 6 NULL 1 |
explain select * from v order by vec_distance_euclidean(b,0x30303030) limit 1; |
id select_type table type possible_keys key key_len ref rows Extra |
1 SIMPLE t ALL NULL NULL NULL NULL 2 Using filesort |
explain select * from (select * from t) sq order by vec_distance_euclidean(b,0x30303030) limit 1; |
id select_type table type possible_keys key key_len ref rows Extra |
1 SIMPLE t ALL NULL NULL NULL NULL 2 Using filesort |
Attachments
Issue Links
- causes
-
MDEV-35922 Server crashes in mhnsw_read_first upon using vector key with views
-
- Closed
-
- is caused by
-
MDEV-35450 VEC_DISTANCE() function to autouse the available index type
-
- Closed
-