Skip to content

Understanding ArcadeDB local graph traversal performance #1110

Answered by lvca
SevorisDoe asked this question in Q&A
Discussion options

You must be logged in to vote

That's 100% accurate :-)

The O(1) time when you retrieve any record by its ID (RID -> RecordID) is because the RID it's encoded the position of the record in the file. For example, the RID #12:1000000 means file number 12 (they are mapped in the schema.json by number) and position in file = 1,000,000. This position is not the actual byte where the record starts. By default, the buckets are created with a 64KB page size, and the maximum number of records per page is set to 2048 (by default).

So in order to find the physical location where the record is stored, you can apply this simple math: 1,000,000 / 2,048 = 488.28125. That means page 488, and location on page = 576 (1,000,000 mod 2048).

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@lvca
Comment options

@lvca
Comment options

@SevorisDoe
Comment options

Answer selected by SevorisDoe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested performance
2 participants