Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-35161

UPDATE and DELETE do not use vector key

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • N/A
    • 11.7
    • Vector search
    • None

    Description

      Apparently vector search is not implemented for UPDATE and DELETE yet. I suppose there could be realistic use cases when it would be needed, but maybe it's not for the first release.

      --source include/have_sequence.inc
       
      create table t (pk int primary key, v vector(1) not null, comment text, vector(v));
      insert into t select seq, 0x00000000, null from seq_1_to_100;
       
      explain select comment from t order by vec_distance_euclidean(v,0x00000000) limit 10;
      explain update t set comment="best-10" order by vec_distance_euclidean(v,0x00000000) limit 10;
      explain delete from t order by vec_distance_euclidean(v,0x00000000) limit 10;
       
      # Cleanup
      drop table t;
      

      bb-11.6-MDEV-32887-vector eff6bc39fcb6e1f691fa08b153d9ea44b9f77b54

      explain select comment from t order by vec_distance_euclidean(v,0x00000000) limit 10;
      id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
      1	SIMPLE	t	index	NULL	v	6	NULL	10	
      explain update t set comment="best-10" order by vec_distance_euclidean(v,0x00000000) limit 10;
      id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
      1	SIMPLE	t	ALL	NULL	NULL	NULL	NULL	100	Using filesort
      explain delete from t order by vec_distance_euclidean(v,0x00000000) limit 10;
      id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
      1	SIMPLE	t	ALL	NULL	NULL	NULL	NULL	100	Using filesort
      

      Attachments

        Issue Links

          Activity

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.