[MDEV-18941] HEAP index is no longer used Created: 2019-03-15  Updated: 2019-03-22  Resolved: 2019-03-22

Status: Closed
Project: MariaDB Server
Component/s: Server, Storage Engine - MyISAM
Affects Version/s: 10.4.4
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Marko Mäkelä Assignee: Sachin Setiya (Inactive)
Resolution: Not a Bug Votes: 0
Labels: performance, regression

Issue Links:
Problem/Incident
is caused by MDEV-18922 Alter on long unique varchar column m... Closed

 Description   

There is a repeatable test failure that was introduced by the MDEV-18922 fix:

CURRENT_TEST: heap.heap_hash
--- /mariadb/10.4/mysql-test/suite/heap/heap_hash.result	2019-03-15 18:06:34.123298015 +0200
+++ /mariadb/10.4/mysql-test/suite/heap/heap_hash.reject	2019-03-15 18:08:34.912797504 +0200
@@ -66,7 +66,7 @@
 alter table t1 engine=myisam;
 explain select * from t1 where a in (869751,736494,226312,802616);
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	index	uniq_id	uniq_id	8	NULL	5	Using where; Using index
+1	SIMPLE	t1	ALL	uniq_id	NULL	NULL	NULL	5	Using where
 drop table t1;
 create table t1 (x int not null, y int not null, key x  using HASH (x), unique y  using HASH (y))
 engine=heap;
 
mysqltest: Result length mismatch

This line was last modified by MDEV-371, but it only replaced 4 with the 8 that is now being removed. After the MDEV-19822 fix, we are no longer "Using index". This looks like a potential performance regression for storage engines that support heap indexes.



 Comments   
Comment by Sachin Setiya (Inactive) [ 2019-03-18 ]

Hi marko,

I think this is correct result , we are creating hash index on myisam , And at the moment we do not support for hash index in optimizer , MDEV-17081 is for optimizer support for hash index.

Comment by Sergei Golubchik [ 2019-03-22 ]

Yes. Before MDEV-371 MyISAM was ignoring "USING HASH" and creating a btree index. Now it doesn't, and creates a HASH index, as requested. And HASH indexes do not support index-only reads.

Generated at Thu Feb 08 08:47:53 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.