I am trying to execute a stored procedure which calls "INSERT" command multiple times in a loop. I want to speedup the insertion process and trying to use "RAM DISK" for this. Let me know the approach to deal with this kind of problem in MySql.
I am on windows 32bit environment
I have a ram disk approach which will help You can create a plugin for MySQL which will dump your data into a ram-disk file and your stored procedure can use this ram disk file for query operation.
Create a MySQL Plugin with the following features.
Stop the MySQL server, copy the plugin binary into plugin folder on mysql and restart the MySQL Server.
create functions in MySQL to expose the plugin API.
CREATE FUNCTION add_info_to_ramdisk RETURNS int SONAME 'yourPluginName.dll'; CREATE FUNCTION get_ramdisk_filename RETURNS String SONAME 'yourPluginName.dll';
Update your stored procedure to use the plugin APIs and populate the data in ram-disk file.
Utilizes the ramdisk file to speedup your query performance.
Let me know if this will helps you out.