I am working on two terminals, in command lines only (no use of phpmyadmin here):
-MariaDB 10.1.9 (on a first computer working on Windows 10)
-Mysql 5.1.73 (on a second computer working on Windows 10)
I am runninng this specific command:
SELECT price, volume
FROM dates d
LEFT JOIN (
SELECT fr.price,fr.volume,f.code_pays,fr.flux,fr.id_date, cf.code,fr.niv
FROM fr_logical_data_2 fr
INNER JOIN fr_pays f ON fr.id_code_pays = f.id
INNER JOIN fr_nc8 n ON fr.id_code_nc8 = n.id
INNER JOIN commodities_fr cf ON n.code_nc8 = cf.nc8
WHERE cf.code = 'code_007' AND fr.flux= 1 AND f.code_pays = 'PT' AND fr.niv = 0
) AS Q
ON Q.id_date = d.id
On Mysql, it takes: 0.1 sec On MariaDB, it takes: 4 min and 5 sec
For the exact same result (49 rows) listed bellow result of the query
Note: The two computers usually have similar time of response
Note2: replacing the LEFT JOIN by an INNER JOIN gives the same time response between the two configuration (but the result is different of course). So i am thinking it could be the way MariaDB interpretes LEFT or RIGHT JOINs.
Does anyone have the same issue ?
Note3: I added the EXPLAIN SELECT... in pictures attached EXPLAIN SELECT...