Hi team. Do I have an advantage in terms of perfor...
# nebula-users
Hi team. Do I have an advantage in terms of performance/lookup speed when choosing int64 as VID over string? I've a vertex which stores a domain name in it (The vertex is associated with a tag named "domain" and domain name is one of its properties). In terms of querying, domain name will be used in most of the cases to query a particular vertex. In such a scenario, should I choose domain name as VID (String type) or use hash algorithm such as snowflake (As suggested in the docs) to generate an int64 and use it as VID. Can you please clarify on the query performance part when using int64 over string as VID?
Yes, it’s correct to use domain name as VID when we could know most query pattern started from domain name.
For performance perspective, I think gernerally a shortter vid length will do help, thus int64 v.s. your fixed-length of string VID for domain-name would help on this trade-off.
πŸ‘ 1
In general yes, it is better to use int64, but difference in performance is not big. The issue with using int64 is that you have to maintain mappings for domain names to int64 externally or create nodes with those mapping.
πŸ‘ 1
❀️ 1
Oh Okay. Thank you @wey and @Goran Cvijanovic
πŸ™Œ 1