← Back to team overview

maria-discuss team mailing list archive

Performance of multiple queries on 10.1 vs 10.3 and 10.4

 

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