We don’t know what database optimization options you used in the post installation wizard of Virtualmin or even what your system specs are, so it is difficult to say anything for sure with regard to database performance, and importing a large database could slow down due to many reasons not related to the database server configuration itself.
“Importing large amounts of data” is disk speed and memory bound. So, most likely either your disk is slow or your memory is small for the amount of data being worked with, or both.
Nothing to do with Virtualmin. And, probably nothing to do with optimization. At least, probably nothing to do with optimization you can do in software.