incrediBILL is right. Your problem is the constant opening and closing of thousands of files. These have to be located, opened, closed, located, opened, closed.
No need to go for a RAMDISK with just 1Mb. The file is so small it will be cached in various places anyway - the O/S the disk hardware cache. Even the amount of space used on the disk will require very little head movement with one file, whilst thousands of files (albeit small) could be all over the place.
Presumably you have some kind of identifier for these files, possibly a sequential name? file0001, file0002, file6000
copy them all into one file and add the name to the end of the existing database
data,data,data,id,file0001
data,data,data,id,file0001
data,data,data,id,file0001
data,data,data,id,file0002
data,data,data,id,file0002
.
.
.
data,data,data,id,file6000
data,data,data,id,file6000
data,data,data,id,file6000
data,data,data,id,file6000