Activity log for bug #1405677

Date Who What changed Old value New value Message
2014-12-25 20:09:15 arcadius bug added bug
2014-12-25 20:09:15 arcadius attachment added tables.sql https://bugs.launchpad.net/bugs/1405677/+attachment/4287415/+files/tables.sql
2014-12-25 20:27:53 arcadius description I have 2 tables: small `a_datakind`, and big `data`, approx. 150GB (see attachment). The query: SELECT STRAIGHT_JOIN * FROM data d WHERE d.Data LIKE '%A223%' AND d.DataKind IN ( SELECT dk.DataKindID FROM a_datakind dk WHERE dk.Transform = 11 ); .. runs inefficiently, EXPLAIN gives: id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY d ALL NULL NULL NULL NULL 4835390 Using where 2 SUBQUERY dk ref PRIMARY,Transform Transform 5 const 6 Using index Adding "FORCE INDEX (Index_data)" to "data d" has no effect. Without "STRAIGHT_JOIN" (which required bacause original query joins some tables), index `Index_data` is used OK: EXPLAIN SELECT * FROM data d WHERE d.Data LIKE '%A223%' AND d.DataKind IN ( SELECT dk.DataKindID FROM a_datakind dk WHERE dk.Transform = 11 ); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE dk ref PRIMARY,Transform Transform 5 const 6 Using index 1 SIMPLE d ref Index_data Index_data 4 main.dk.DataKindID 268632 Using where So, in production, I have to collect datakinds by additional query: SELECT GROUP_CONCAT(DataKindID SEPARATOR ", ") FROM a_datakind WHERE Transform = 11; .. and then use its output in the IN clause. I have 2 tables: small `a_datakind`, and big `data`, approx. 150GB (see attachment). The query: SELECT STRAIGHT_JOIN * FROM data d WHERE d.Data LIKE '%A223%' AND d.DataKind IN (    SELECT dk.DataKindID    FROM a_datakind dk    WHERE dk.Transform = 11 ); .. runs inefficiently, EXPLAIN gives: id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY d ALL NULL NULL NULL NULL 4835390 Using where 2 SUBQUERY dk ref PRIMARY,Transform Transform 5 const 6 Using index Adding "FORCE INDEX (Index_data)" to "data d" has no effect. Without "STRAIGHT_JOIN" (which required because original query joins some tables), index `Index_data` is used OK: EXPLAIN SELECT * FROM data d WHERE d.Data LIKE '%A223%' AND d.DataKind IN (    SELECT dk.DataKindID    FROM a_datakind dk    WHERE dk.Transform = 11 ); id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE dk ref PRIMARY,Transform Transform 5 const 6 Using index 1 SIMPLE d ref Index_data Index_data 4 main.dk.DataKindID 268632 Using where So, in production, I have to collect datakinds by additional query: SELECT GROUP_CONCAT(DataKindID SEPARATOR ", ") FROM a_datakind WHERE Transform = 11; .. and then use its output in the IN clause.
2014-12-30 08:47:54 Valerii Kravchuk nominated for series percona-server/5.6
2014-12-30 08:47:54 Valerii Kravchuk bug task added percona-server/5.6
2014-12-30 08:47:54 Valerii Kravchuk nominated for series percona-server/5.5
2014-12-30 08:47:54 Valerii Kravchuk bug task added percona-server/5.5
2015-01-06 10:35:57 Nilnandan Joshi percona-server/5.6: status New Confirmed
2015-01-06 10:37:12 Nilnandan Joshi percona-server/5.5: status New Invalid
2015-01-06 10:40:01 Nilnandan Joshi bug added subscriber Nilnandan Joshi
2015-01-07 05:55:38 Laurynas Biveinis percona-server/5.6: status Confirmed Triaged
2015-01-07 05:55:40 Laurynas Biveinis percona-server/5.6: importance Undecided Medium
2015-01-09 05:42:13 Nilnandan Joshi bug watch added http://bugs.mysql.com/bug.php?id=75457
2015-01-09 05:42:48 Nilnandan Joshi bug task added mysql-server
2015-01-09 05:52:20 Laurynas Biveinis tags upstream
2016-03-25 14:58:36 Laurynas Biveinis nominated for series percona-server/5.7
2016-03-25 14:58:36 Laurynas Biveinis bug task added percona-server/5.7
2016-03-25 14:58:47 Laurynas Biveinis percona-server/5.6: status Triaged Incomplete
2016-03-25 14:58:49 Laurynas Biveinis percona-server/5.7: status Triaged Incomplete