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

Vector search is not shown in perfschema, queries are counted as not using index

    XMLWordPrintable

Details

    Description

      --source include/have_perfschema.inc
       
      create table t_vec (pk int primary key, v vector(1) not null, vector(v));
      create table t_gis (pk int primary key, g geometry not null, spatial(g));
       
      select object_schema, object_name, index_name, count_star from performance_schema.table_io_waits_summary_by_index_usage where object_name in ('t_vec','t_gis');
       
      insert into t_vec values (1,0x31313131),(2,0x32323232);
      select * from t_vec order by vec_distance_euclidean(v,0x30303030) limit 1;
       
      select object_schema, object_name, index_name, count_star from performance_schema.table_io_waits_summary_by_index_usage where object_name = 't_vec';
       
      # Cleanup
      drop table t_vec, t_gis;
      

      3e03a45aa4c69e5aa76c9396547797a895a98edc

      create table t_vec (pk int primary key, v vector(1) not null, vector(v));
      create table t_gis (pk int primary key, g geometry not null, spatial(g));
      select object_schema, object_name, index_name, count_star from performance_schema.table_io_waits_summary_by_index_usage where object_name in ('t_vec','t_gis');
      object_schema	object_name	index_name	count_star
      test	t_vec	PRIMARY	0
      test	t_gis	PRIMARY	0
      test	t_gis	g	0
      insert into t_vec values (1,0x31313131),(2,0x32323232);
      select * from t_vec order by vec_distance_euclidean(v,0x30303030) limit 1;
      pk	v
      1	1111
      select object_schema, object_name, index_name, count_star from performance_schema.table_io_waits_summary_by_index_usage where object_name = 't_vec';
      object_schema	object_name	index_name	count_star
      test	t_vec	PRIMARY	0
      test	t_vec	NULL	3
      drop table t_vec, t_gis;
      

      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.