> I noticed that my DB import process is much slower when run on the DB on disk, vs. in memory. It reads files and runs a massive amount of inserts/updates.
Memory access is much faster than disk access. If you're using actual spinning hard disks, your computer has to wait for the disk to be spun to the right place before it can read or write data. That could take 1/5000th of a second. By contrast, memory access is almost instant.
> Why is this? Is there any way to speed it with disk without using in-memory DB?
If you are importing into an empty database and you don't care about corruption due to power-failure, it would be safe to do