maria-discuss team mailing list archive
-
maria-discuss team
-
Mailing list archive
-
Message #05648
Performance of multiple queries on 10.1 vs 10.3 and 10.4
-
To:
maria-discuss@xxxxxxxxxxxxxxxxxxx
-
From:
Andre Nathan <andre@xxxxxxxxxxxxxxx>
-
Date:
Fri, 11 Oct 2019 08:10:03 -0300
-
Feedback-id:
MjAxOTEwMTE=:YW5kcmVAZGlnaXJhdGkuY29tLmJy:ZGlnaXJhdGkuY29tLmJy:k8networks
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
Hi
I have a trivial PHP script using mysqli::multi_query (error handling
ommited):
$queries = "...";
$db = new mysqli("localhost", $user, $pass, $database);
$db->multi_query($queries);
$db->close();
Here $queries refers to a large number (hundreds) of CREATE TABLE, ALTER
TABLE and INSERT queries derived from a database migration system.
When I run this script against MariaDB 10.1, it returns immediately, and
a SHOW PROCESSLIST on the MariaDB console shows tables being created
after the script has finished running. In other words, it's as if the
queries run asynchronously.
If I upgrade to 10.3 or 10.4, the behavior changes and becomes
"synchronous": the script takes minutes to run and only finishes once
every query has run.
Is this a known behavior on later MariaDB versions? Is there a
configuration setting that can restore the behavior from 10.1?
I've tested this on an Ubuntu 18.04 VM with packages installed from
MariaDB's APT repositories, using default configurations.
Thanks in advance,
Andre