As an extension to the flash memory speed tests,
tried inserting records into derby:
CREATE TABLE number (oid INT, PRIMARY KEY(oid));
INSERT INTO number(oid) values(?);
oid=1...n
database size :
1kRecs : 760kB
10kRecs : 2.4MB
100kRecs : 9.4MB
1000kRecs: 57.6MB
create database and table takes about 2 seconds.
important when number of records is small
commit size is main factor.
Without Table creation With Table Creation
N Recs Rate Time Rate Time
-Commit size 1
1kRecs 351.61743Recs/s (2.845s) 195.73302Recs/s (5.109s)
10kRecs 661.682Recs/s (15.113s) 573.4274Recs/s (17.439s)
-Commit size 10
10kRecs 1623.1132Recs/s (6.161s) 1094.9304Recs/s (9.133s)
100kRecs 3172.3877Recs/s (31.522s) 2956.743Recs/s (33.821s)
-Commit size 100
1kRecs 542.8882Recs/s (1.842s) 243.13155Recs/s (4.113s)
10kRecs 2001.2007Recs/s (4.997s) 1376.652Recs/s (7.264s)
100kRecs 4766.6714Recs/s (20.979s) 4247.7275Recs/s (23.542s)
-Commit size 1000
1kRecs 368.86758Recs/s (2.711s) 149.23146Recs/s (6.701s)
10kRecs 2046.2451Recs/s (4.887s) 1395.0892Recs/s (7.168s)
100kRecs 5414.4785Recs/s (18.469s) 4817.42Recs/s (20.758s)
1000kRecs 6039.4863Recs/s (165.577s) 5950.5747Recs/s (168.051s)
-Commit size 2000
1000kRecs 5626.5757Recs/s (177.728s) 5549.482Recs/s (180.197s)
As an extension to the flash memory speed tests,
tried inserting records into derby:
CREATE TABLE number (oid INT, PRIMARY KEY(oid));
INSERT INTO number(oid) values(?);
oid=1...n
database size :
1kRecs : 760kB
10kRecs : 2.4MB
100kRecs : 9.4MB
1000kRecs: 57.6MB
create database and table takes about 2 seconds.
important when number of records is small
commit size is main factor.
Without Table creation With Table Creation
N Recs Rate Time Rate Time
-Commit size 1
1kRecs 351.61743Recs/s (2.845s) 195.73302Recs/s (5.109s)
10kRecs 661.682Recs/s (15.113s) 573.4274Recs/s (17.439s)
-Commit size 10
10kRecs 1623.1132Recs/s (6.161s) 1094.9304Recs/s (9.133s)
100kRecs 3172.3877Recs/s (31.522s) 2956.743Recs/s (33.821s)
-Commit size 100
1kRecs 542.8882Recs/s (1.842s) 243.13155Recs/s (4.113s)
10kRecs 2001.2007Recs/s (4.997s) 1376.652Recs/s (7.264s)
100kRecs 4766.6714Recs/s (20.979s) 4247.7275Recs/s (23.542s)
-Commit size 1000
1kRecs 368.86758Recs/s (2.711s) 149.23146Recs/s (6.701s)
10kRecs 2046.2451Recs/s (4.887s) 1395.0892Recs/s (7.168s)
100kRecs 5414.4785Recs/s (18.469s) 4817.42Recs/s (20.758s)
1000kRecs 6039.4863Recs/s (165.577s) 5950.5747Recs/s (168.051s)
-Commit size 2000
1000kRecs 5626.5757Recs/s (177.728s) 5549.482Recs/s (180.197s)
Traverse Directory tree advising IFileHandler
of each Directory and File that is reached:
org.galo.filesystem:
public interface IFileHandler {
public void handle(File f);
}
public class BaseWalker {
public BaseWalker(IFileHandler directoryHandler,
IFileHandler fileHandler) ;
}
There are static shortcuts:
int DirectoryWalker.count(File baseDir);
List DirectoryWalker.list(File baseDir);
int FileWalker.count(File baseDir);
List DirectoryWalker.list(File baseDir);
Traverse Directory tree advising IFileHandler
of each Directory and File that is reached:
org.galo.filesystem:
public interface IFileHandler {
public void handle(File f);
}
public class BaseWalker {
public BaseWalker(IFileHandler directoryHandler,
IFileHandler fileHandler) ;
}
There are static shortcuts:
int DirectoryWalker.count(File baseDir);
List DirectoryWalker.list(File baseDir);
int FileWalker.count(File baseDir);
List DirectoryWalker.list(File baseDir);