Load data infile

Also, you, I’m pointing a finger right at you matomo devs out there, constantly tout that you have tuned your queries for MySQL as a reason for no being able to support PostgreSQL, except you can’t even support datawarehousing 100k requests per month without this horrible hack which seems to be extremely difficult to get configured.

PostgreSQL is perfect for this kind of work of continuously writing rows into a single table, but I have had to use the QueuedTracking plugin to store requests into Redis when we get a spike in requests because MySQL can’t cope with the influx (I also can’t run the archival process during the daytime because it causes the DB performance to fall apart.)

Basically, it’s apparent that MySQL isn’t suitable for our use case with Matomo but we have no other options, I’ve got to support MySQL just for this project (we use another PHP app, you might of heard of it, it’s Icinga2 but that supports PostgreSQL.)

It all comes back to you falling back onto this method of updating the database in MySQL for “high load” situations when you have been ripped apart for the insecurity of using this option in the github issues, and steadfastly refusing to consider probably the best high performing database alternative.
Given that the performance of your MySQL queries are already so poor I don’t think that moving over to an multi DB ORM is going to hurt things too much whilst coming with a benefit of allowing people to move to another DB.

I’ve looked back over my tickets from when I was setting this up in Debian and it seems that I needed to install the php5-mysqlnd package, this is the mysql native driver package to get this to work remotely.

Now I have a problem in that on FreeBSD native driver functionality of php73-mysqli is a compile time option which means that I have to build from a port.

I found this not working and it confused me for a while, until I found out that PHP had disabled mysqli.allow_local_infile by default as of PHP 7.2.16 / 7.3.3.

It’s particularly confusing because the production default config, which I believe Debian installs, makes it look like On is still the default - it isn’t. You have to remove the semicolon before the line provided, as so:

mysqli.allow_local_infile = On

I’ve got the documentation fixed for this exact issue now, as I updated an issue I found on github. I ran through all the documentation and still couldn’t get this to work. I am in the process of updating some very old Debian machines to FreeBSD with 7.4 from 5.5. Thus my Debian installs were working just fine for this feature but my FreeBSD boxes were broken.

It may not seem like an issue for most people but with over 20m page views per month, this really needed fixing for us before we could migrate.