It takes hours to add a json data with 500 thousand data to the relevant table in the database. Is there any way to speed this up? The machine I use is really efficient.
What is the version of MySQL you’re using there? If you’re running older versions of MySQL, i.e. 5.6 or 5.7, it had a flaw in memory allocation when dealing with large values.
I would suggest solving familiar kind of problems by resetting a config to defaults, meaning that removing those, mentioned above options from your current MariaDB config file, and restarting the service would most likely solve your issue.
In general, tweaking any kind of cache and buffers options should be done with care, as larger doesn’t mean faster. Most of the times it should be left intact, especially on the latest versions of MariaDB, as defaults would work just fine. If you have to make changes, consider initial default values, and don’t apply new, custom values that are thousands times larger.