I have a MariaDB 10.6 the db is used for phpunit tests. The database is dropped and recreated each time I run the unit tests.
I would like to maximize the speed of the interactions (read/write) with this db while I totally don't care about persistence.
I was thinking of converting all tables to
MEMORY engine, I can't find detailed infos about this engine on mariadb docs, but the mysql docs says that
BLOB fields are not supported as well as transactions. So, no way.
I was thinking of converting the tables to
TEMPORARY tables, but this was based on the false belief that they are stored in RAM.
I came across the idea of running
InnoDB on RAM setting
--datadir=/dev/shm/mysql/, but elsewhere I read that this is not a good idea 'cause MariaDB won't be able to handle a reboot.
So I think that the best thing to do is to tweak
InnoDB settings to maximize performance at the expense of persistence.
I saw this answer but it refers to MySQL 5.6 and a lot of things changed in
InnoDB since that release.
What settings do you recommend?
LOAD DATA(best); batched INSERTs (good); single-row INSERTs (terrible); other?
LOAD DATA, I'll work on it but I have to balance the maintainability of the tests.