Hi Luca, this is it:
E:\mydb>dir
Volume in drive E is New Volume
Volume Serial Number is 8200-A440
Directory of E:\mydb
08/19/2010 05:10 PM <DIR> .
08/19/2010 05:10 PM <DIR> ..
08/19/2010 05:53 PM 524,289,019 account.0.ocl
08/19/2010 05:53 PM 226,565,449 account.1.ocl
08/19/2010 05:53 PM 262,144 account.och
08/19/2010 05:53 PM 1,049,600 default.0.ocl
08/19/2010 05:53 PM 524,289,024 default.0.oda
08/19/2010 05:21 PM 10,485,760 default.1.oda
08/19/2010 04:58 PM 524,289,024 default.10.oda
08/19/2010 05:02 PM 524,289,024 default.11.oda
08/19/2010 05:04 PM 524,289,024 default.12.oda
08/19/2010 05:06 PM 524,289,024 default.13.oda
08/19/2010 05:08 PM 524,289,024 default.14.oda
08/19/2010 05:10 PM 524,289,024 default.15.oda
08/19/2010 05:12 PM 479,603,342 default.16.oda
08/19/2010 04:44 PM 524,289,024 default.2.oda
08/19/2010 04:46 PM 524,289,024 default.3.oda
08/19/2010 04:48 PM 524,289,024 default.4.oda
08/19/2010 04:49 PM 524,289,024 default.5.oda
08/19/2010 04:51 PM 524,289,024 default.6.oda
08/19/2010 04:53 PM 524,289,024 default.7.oda
08/19/2010 04:54 PM 524,289,024 default.8.oda
08/19/2010 04:56 PM 524,289,024 default.9.oda
08/19/2010 05:53 PM 262,144 default.och
08/19/2010 05:53 PM 263,168 default.odh
08/19/2010 05:53 PM 1,048,576 index.0.ocl
08/19/2010 05:53 PM 262,144 index.och
08/19/2010 05:53 PM 1,049,600 internal.0.ocl
08/19/2010 05:53 PM 262,144 internal.och
08/19/2010 05:53 PM 1,000,000 txlog.otx
28 File(s) 9,110,738,450 bytes
2 Dir(s) 27,904,212,992 bytes free
Schema create with:
OClass account = database
.getMetadata()
.getSchema()
.createClass(
"Account",
database.getStorage().addCluster("account",
OClusterLocal.TYPE));
account.createProperty("id", OType.LONG);
account.createProperty("val1", OType.DOUBLE);
account.createProperty("val2", OType.DOUBLE);
account.createProperty("val3", OType.FLOAT);
account.createProperty("val4", OType.SHORT);
account.createProperty("val5", OType.STRING);
account.createProperty("name", OType.STRING);
Insert data code:
ODatabaseDocumentTx db = new ODatabaseDocumentTx(url).open("admin",
"admin");
db.declareIntent(new OIntentMassiveInsert());
db.begin(TXTYPE.NOTX);
long ndoc = 50000000;
ODocument doc = new ODocument();
long start = System.nanoTime();
long block = System.nanoTime();
for (long i = 1; i <= ndoc; i++) {
doc.field("id", i);
doc.field("val1", 4.0d);
doc.field("val2", 5.0d);
doc.field("val3", 6.0f);
doc.field("val4", 255);
doc.field("val5",
"this is the description for a long comic books -" + i);
doc.field("name", "this is secmask put on top - " + i);
doc.setClassName("Account");
doc.setDatabase(db);
doc.save();
doc.reset();
if (i % 100000 == 0) {
double time = (double) (System.nanoTime() - block) / 1000000;
System.out.println(i * 100 / ndoc + "%.\t" + time + "\t"
+ 100000.0d / time + " docs/ms");
block = System.nanoTime();
}
}
db.commit();
and the query:
List<ODocument> result = db
.query(new ONativeSynchQuery<ODocument,
OQueryContextNativeSchema<ODocument>>(
db, "Account",
new OQueryContextNativeSchema<ODocument>()) {
@Override
public boolean filter(
OQueryContextNativeSchema<ODocument> iRecord) {
return iRecord.field("id").eq(1000l).field("name").go();
}
});
for (ODocument o : result) {
System.out.println("id=" + o.field("id") + "\tname="
+ o.field("name"));
}
and other thing is that, i using for-loop to create 50 millions
record, but when I call long c = db.countClass("Account"); , it
returns value is 49.999.999 .
secmask.
On Aug 19, 6:53 pm, Luca Garulli <
l.garu...@gmail.com> wrote:
> Hi,
> no it's a bug. OrientDB support theorically 9.223.372.036 Billions of
> records. I'm saying theoretically because I don't know if anyone could
> never test it.
>
> Can you copy and paste your database directory structure here? A "ls
> -al" should be enough.
>
> Lvc@
>