Details
-
Type:
Task
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Fix Version/s: 10.1
-
Component/s: None
-
Labels:None
Description
In 5.3 derived_merge was passing the CONVERT_IF_BIGGER_TO_BLOB and would force the optimizer not to produce on disk temporary table . It stopped working in 5.5
I have documented the issue here :
http://varokism.blogspot.fr/2011/12/back-on-disk-temporary-tables.html
At that time no test case have been produce and merging may have break this improvement.
Gliffy Diagrams
Attachments
Issue Links
- is blocked by
-
MDEV-19 Memory tables: VARCHAR and BLOB support
-
- Stalled
-
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
Hi Stephane,
I've tried to investigate the issue. I created this testcase:
CREATE TABLE `login2` (
`user_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user_name` varchar(50) DEFAULT NULL,
`user_email` varchar(2000) CHARACTER SET utf8 DEFAULT NULL,
`created` datetime DEFAULT NULL,
PRIMARY KEY (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=102048 DEFAULT CHARSET=latin1;
insert into login2 values (100002, 'user-100002', 'email-100002', now());
insert into login2 values (100003, 'user-100003', 'email-100003', now());
insert into login2 values (100004, 'user-100004', 'email-100004', now());
insert into login2 values (100007, 'user-100007', 'email-100007', now());
insert into login2 values (100008, 'user-100008', 'email-100008', now());
select * from (
select
user_id,
created,
(select user_email from login2 b where b.user_id=a.user_id ) as mail
from
login2 a
where
a.user_id IN (100005, 100002, 100004, 100003)
) as a order by created;
and ran it.
Then, I replaced varchar(2000) with varchar(200) and ran it again. In both cases, the EXPLAIN was
-----
-----------------------------------------------------------------------------------------------------+-----
-----------------------------------------------------------------------------------------------------+-----
-----------------------------------------------------------------------------------------------------+