Details
-
Bug
-
Status: Closed (View Workflow)
-
Blocker
-
Resolution: Not a Bug
-
10.6.12
-
None
-
Ubuntu 22.04 (10.6.12-MariaDB-0ubuntu0.22.04.1-log)
Description
We have two big tables (> 1 and 10 mio entries). Query looks like this:
EXPLAIN SELECT |
`assets`.*,
|
`asset_media`.`media_id` AS `pivot_media_id`, |
`asset_media`.`asset_id` AS `pivot_asset_id` |
FROM
|
`assets`
|
INNER JOIN `asset_media` ON `assets`.`id` = `asset_media`.`asset_id` |
WHERE
|
`asset_media`.`media_id` = 479877
|
AND `assets`.`deleted_at` IS NULL |
After upgrade to MariaDB 10.6 (From 10.3) the query optimizer is not able to choose the correct order (See screenshots and dump). Dump needed to get reduced to get it uploaded to Jira (10MB).
Expected:
First use `asset_media` and then `assets` table.
Result:
Wrong order
This causes our statement(s) to significantly loose performance (from 0.5sec to 9sec)