2
I created a test table and added a script that randomly generates characters and an Insert in the a, b and c fields. For the realization of 1000 INSERTS took the time of 36s and running the same script but without writing in the bank the result was 1 second. I can improve that time somehow?
Setup:
Server type: Mariadb
Operating System: Windows 7
RAM: 4G
Processor: Pentium E5700 3Ghz
Bench:
CREATE TABLE `teste` (
`id` int(11) NOT NULL,
`a` varchar(15) NOT NULL,
`b` varchar(15) NOT NULL,
`c` varchar(15) NOT NULL
)
ALTER TABLE `teste`
ADD PRIMARY KEY (`id`);
ALTER TABLE `teste`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
I understand your script generates an INSERT command for each tuple to be included. Try to join multiple tuples in a single INSERT command. Also evaluate if using the LOAD DATA command does not speed up your load.
– anonimo