Reputation: 95
I'm confused the query performance when querying in such saturation :
using index
using graph vertex id directly
So I wonder whether there would be some difference with such performance ?
Upvotes: 0
Views: 371
Reputation: 408
So in this case JanusGraph indexes are used to facilitate looking up the vertex id. So if you already have the vertex id and you can skip the index lookup that will be fastest option.
As for querying a String property vs a Long property, a Long will perform better. If the results are cached you'll see very similar performance for both lookups, but if not an empty String in java takes up 40 bytes and then grows after 20 characters where as a Long takes up 8 bytes. The footprint of Long composite index is smaller and should query faster.
Upvotes: 2