Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
11.8, 12.3, 13.1
-
None
Description
Spawned from MDEV-40954 upon discussion in the comments.
InnoDB statistics is notoriously unreliable. ANALYZE improves most of it when it is badly off, but not for vector indexes.
I've set the fix version to 13.1 as it's where the problem becomes evident, please feel free to adjust it as needed.
--source include/have_innodb.inc
|
--source include/have_sequence.inc
|
|
|
create table t ( |
pk int primary key, |
v vector(1) not null, |
vector(v)
|
) engine=InnoDB;
|
insert into t select seq, vec_fromtext(concat('[',seq,']')) |
from seq_1_to_1000; |
select total_nodes, table_rows from information_schema.vector_indexes |
natural join information_schema.tables |
where table_name = 't'; |
|
|
--source include/restart_mysqld.inc
|
|
|
select total_nodes, table_rows from information_schema.vector_indexes |
natural join information_schema.tables |
where table_name = 't'; |
|
|
analyze table t; |
|
|
select total_nodes, table_rows from information_schema.vector_indexes |
natural join information_schema.tables |
where table_name = 't'; |
|
|
drop table t; |
|
PR-4955 7ab9408e1b8b8d6c84f12cf7d666b353591dc412 |
select total_nodes, table_rows from information_schema.vector_indexes |
natural join information_schema.tables |
where table_name = 't'; |
total_nodes table_rows
|
1000 1000
|
# restart
|
select total_nodes, table_rows from information_schema.vector_indexes |
natural join information_schema.tables |
where table_name = 't'; |
total_nodes table_rows
|
31 21
|
analyze table t; |
Table Op Msg_type Msg_text |
test.t analyze status Engine-independent statistics collected |
test.t analyze status OK
|
select total_nodes, table_rows from information_schema.vector_indexes |
natural join information_schema.tables |
where table_name = 't'; |
total_nodes table_rows
|
31 1000
|
Attachments
Issue Links
- relates to
-
MDEV-34805 provide various information about vector indexes
-
- Closed
-
-
MDEV-40954 I_S.TABLES.TABLE_ROWS value for InnoDB table falls to 7 after restart
-
- Open
-