Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.4.18
-
CentOS 7 (CentOS Linux release 7.9.2009 (Core))
Description
The query below is much slower on MariaDB than on MySQL. Tested on two independent CentOS 7 machines and 3 MariaDB versions 10.4.18, 10.4.17and 10.4.14.:
SELECT * |
FROM `catalog_product_entity` AS `e` |
LEFT JOIN `catalog_product_entity_varchar` AS `at_name_default` ON (`at_name_default`.`entity_id` = `e`.`entity_id`) |
AND (`at_name_default`.`attribute_id` = '65') |
AND `at_name_default`.`store_id` = 0 |
LEFT JOIN `catalog_product_entity_varchar` AS `at_name` ON (`at_name`.`entity_id` = `e`.`entity_id`) |
AND (`at_name`.`attribute_id` = '65') |
AND (`at_name`.`store_id` = 1) |
WHERE (at_name.value IS NOT NULL OR at_name_default.value IS NOT NULL); |
MariaDB CentOS 7:
Empty set (18.916 sec)
MySQL:
Empty set (0.02 sec)
Also tested on MariaDB 10.2.32 on openSUSE Leap 15.1:
Empty set (0.03 sec)
Interestingly, when I add e.entity_id < 4564 condition, there is a breakpoint before the query takes 0 seconds and after 4 seconds, depending on the number. But this number depends on system. On my system, the value was 4564 where the query already took 4 seconds, but it took 0 seconds with 4563.
Database dump is attached.
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Description |
The query below is much slower on MariaDB than on MySQL. Tested on two independent CentOS 7 machines and 3 MariaDB versions 10.4.18, 10.4.17and 10.4.14.:
{{SELECT * FROM `catalog_product_entity` AS `e` LEFT JOIN `catalog_product_entity_varchar` AS `at_name_default` ON (`at_name_default`.`entity_id` = `e`.`entity_id`) AND (`at_name_default`.`attribute_id` = '65') AND `at_name_default`.`store_id` = 0 LEFT JOIN `catalog_product_entity_varchar` AS `at_name` ON (`at_name`.`entity_id` = `e`.`entity_id`) AND (`at_name`.`attribute_id` = '65') AND (`at_name`.`store_id` = 1) WHERE (at_name.value IS NOT NULL OR at_name_default.value IS NOT NULL);}} MariaDB CentOS 7: {{Empty set (18.916 sec)}} MySQL: {{Empty set (0.02 sec)}} Also tested on MariaDB 10.2.32 on openSUSE Leap 15.1: {{Empty set (0.03 sec)}} Interestingly, when I add e.entity_id < 4564 condition, there is a breakpoint before the query takes 0 seconds and after 4 seconds, depending on the number. But this number depends on system. On my system, the value was 4564, where the query already took 4 seconds, but with it took 0 seconds with 4563. Database dump is attached. |
The query below is much slower on MariaDB than on MySQL. Tested on two independent CentOS 7 machines and 3 MariaDB versions 10.4.18, 10.4.17and 10.4.14.:
{{SELECT * FROM `catalog_product_entity` AS `e` LEFT JOIN `catalog_product_entity_varchar` AS `at_name_default` ON (`at_name_default`.`entity_id` = `e`.`entity_id`) AND (`at_name_default`.`attribute_id` = '65') AND `at_name_default`.`store_id` = 0 LEFT JOIN `catalog_product_entity_varchar` AS `at_name` ON (`at_name`.`entity_id` = `e`.`entity_id`) AND (`at_name`.`attribute_id` = '65') AND (`at_name`.`store_id` = 1) WHERE (at_name.value IS NOT NULL OR at_name_default.value IS NOT NULL);}} MariaDB CentOS 7: {{Empty set (18.916 sec)}} MySQL: {{Empty set (0.02 sec)}} Also tested on MariaDB 10.2.32 on openSUSE Leap 15.1: {{Empty set (0.03 sec)}} Interestingly, when I add e.entity_id < 4564 condition, there is a breakpoint before the query takes 0 seconds and after 4 seconds, depending on the number. But this number depends on system. On my system, the value was 4564 where the query already took 4 seconds, but it took 0 seconds with 4563. Database dump is attached. |
Description |
The query below is much slower on MariaDB than on MySQL. Tested on two independent CentOS 7 machines and 3 MariaDB versions 10.4.18, 10.4.17and 10.4.14.:
{{SELECT * FROM `catalog_product_entity` AS `e` LEFT JOIN `catalog_product_entity_varchar` AS `at_name_default` ON (`at_name_default`.`entity_id` = `e`.`entity_id`) AND (`at_name_default`.`attribute_id` = '65') AND `at_name_default`.`store_id` = 0 LEFT JOIN `catalog_product_entity_varchar` AS `at_name` ON (`at_name`.`entity_id` = `e`.`entity_id`) AND (`at_name`.`attribute_id` = '65') AND (`at_name`.`store_id` = 1) WHERE (at_name.value IS NOT NULL OR at_name_default.value IS NOT NULL);}} MariaDB CentOS 7: {{Empty set (18.916 sec)}} MySQL: {{Empty set (0.02 sec)}} Also tested on MariaDB 10.2.32 on openSUSE Leap 15.1: {{Empty set (0.03 sec)}} Interestingly, when I add e.entity_id < 4564 condition, there is a breakpoint before the query takes 0 seconds and after 4 seconds, depending on the number. But this number depends on system. On my system, the value was 4564 where the query already took 4 seconds, but it took 0 seconds with 4563. Database dump is attached. |
The query below is much slower on MariaDB than on MySQL. Tested on two independent CentOS 7 machines and 3 MariaDB versions 10.4.18, 10.4.17and 10.4.14.:
{code:sql} SELECT * FROM `catalog_product_entity` AS `e` LEFT JOIN `catalog_product_entity_varchar` AS `at_name_default` ON (`at_name_default`.`entity_id` = `e`.`entity_id`) AND (`at_name_default`.`attribute_id` = '65') AND `at_name_default`.`store_id` = 0 LEFT JOIN `catalog_product_entity_varchar` AS `at_name` ON (`at_name`.`entity_id` = `e`.`entity_id`) AND (`at_name`.`attribute_id` = '65') AND (`at_name`.`store_id` = 1) WHERE (at_name.value IS NOT NULL OR at_name_default.value IS NOT NULL); {code} MariaDB CentOS 7: {{Empty set (18.916 sec)}} MySQL: {{Empty set (0.02 sec)}} Also tested on MariaDB 10.2.32 on openSUSE Leap 15.1: {{Empty set (0.03 sec)}} Interestingly, when I add e.entity_id < 4564 condition, there is a breakpoint before the query takes 0 seconds and after 4 seconds, depending on the number. But this number depends on system. On my system, the value was 4564 where the query already took 4 seconds, but it took 0 seconds with 4563. Database dump is attached. |
Fix Version/s | 10.4 [ 22408 ] | |
Assignee | Sergei Petrunia [ psergey ] |
Workflow | MariaDB v3 [ 119546 ] | MariaDB v4 [ 142628 ] |