
Summary:

MySQL, ProLiant DL180G5, CentOS 5.2

1. Batch inserts 10M unique! records in table 'File' (DB schema not changed) : 39 hours (23+16), DB file size 15,4 Gb
2. Batch inserts 10M unique! records in table 'File' (NEW DB schema see also create_mysql_test2.sh) : 35 hours (19+16), DB file size 15,2 Gb

Source code attached.

Please note that the length of time (16 hours) insert records from the table 'batch' to the table 'File' the same.
This indicates the stability of results.

# ./test
Date: Oct 10 2008 11:27:37
Host: Localhost via UNIX socket
Use database: 'bacula_test'.
Temporary table 'batch' created.
Start filling tables 'batch'(temporary), 'Path', 'Filename' ...
End.
10000000 records inserts.
*** CPUs time used : 375.880000
*** Elapsed time (wall clock) : 85334.000000 

Start inserts from temporary table 'batch' to 'File' ...
End inserts to 'File' ...
*** CPUs time used : 0.000000
*** Elapsed time (wall clock) : 58838.000000




# ./test2
Date: Oct 10 2008 11:27:37
Host: Localhost via UNIX socket
Use database: 'bacula_test2'.
Temporary table 'batch' created.
Start filling tables 'batch'(temporary), 'Path', 'Filename' ...
End.
10000000 records inserts.
*** CPUs time used : 384.650000
*** Elapsed time (wall clock) : 71670.000000

Start inserts from temporary table 'batch' to 'File' ...
End inserts to 'File' ...
*** CPUs time used : 0.000000
*** Elapsed time (wall clock) : 58564.000000


