In OrientDB each record has its own self-assigned unique ID within the database called Record ID or RID. It is composed of two parts:
#<cluster-id>:<cluster-position>
So the maximum size of a database is 2^78 records = 302,231,454,903 Trillion of records. We have never tested such high numbers due to the lack of hardware resources, but we most definitely have users working with OrientDB databases in the billions of records.
A RID (Record ID) is the physical position of the record inside the database. This means that loading a record by its RID is blazing fast, even with a growing database. With document and relational DBMS the more data you have, the slower the database will be. Joins have a heavy runtime cost. OrientDB handles relationships as physical links to the records. The relationship is assigned only once when the edge is created O(1). Compare this to an RDBMS that “computes“ the relationship every single time you query a database O(LogN). Traversing speed is not affected by the database size in OrientDB. It is always constant, whether for one record or 100 billion records. This is critical in the age of Big Data!
To load a record directly via the console, use the load record
command. Below, we load the record #12:4 of the "demo" database.
orientdb> load record #12:4
--------------------------------------------------
ODocument - Class: Company id: #12:4 v.8
--------------------------------------------------
addresses : [NOT LOADED: #19:159]
salary : 0.0
employees : 100004
id : 4
name : Microsoft4
initialized : false
salary2 : 0.0
checkpoint : true
created : Sat Dec 29 23:13:49 CET 2012
The load record
command returns some useful information about this record: