Titan: Good practice about making key

Manish Kumar

Say I have defined key:

    g.makeKey("k1").dataType(String.class).indexed(Vertex.class).unique().make();
    g.makeKey("k2").dataType(String.class).indexed(Vertex.class).make();
    g.makeKey("k3").dataType(String.class).indexed(Vertex.class).make();


    TitanKey time = g.makeKey("time").dataType(Long.class).make();
    g.makeLabel("L2").sortKey(time).sortOrder(Order.DESC).make();
    g.makeLabel("L3").sortKey(time).sortOrder(Order.DESC).make();
    g.makeLabel("L1").sortKey(time).sortOrder(Order.DESC).make();
  1. How many key we can make using makeKey(). Is there any limitation or performance issue with the number of key made through makeKey() or makeLabel()

  2. What is the best practice shall i use different label key L1, L2, L3 or use single L1 for different purpose from the performance point of view

Daniel Kuppitz

most projects need only a few type definitions, but I've also seen projects with 1.000s of type definitions and no bad performance impact. I would go with different labels for different purposes.

Cheers, Daniel

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Is it a good practice to manually change foreign key values?

From Dev

WPF good practice about open window and back button

From Dev

Slick confused about numThreads and best practice for good performance

From Dev

Is this good practice?

From Dev

What to use (best/good practice) for the secret key in HMAC solution?

From Dev

Is !obj[key] a good practice to check the existence of an object's property in JavaScript?

From Dev

Processing multiple mails in a Postfix mailbox by making cronjob run per second-is that considered good practice?

From Dev

Is it good practice in Java OOP to allow an object to know about other instances of its type?

From Dev

Is it good practice to fake an inserter?

From Dev

Are convenience functions a good practice?

From Dev

Is extending classes good practice?

From Dev

Is "assert false;" a good practice?

From Dev

Good practice with Angular Translate

From Dev

Is it a good practice to throw exceptions?

From Dev

Is Utils file good practice?

From Dev

Is it good practice to use counters?

From Dev

Good practice with conditional imports

From Dev

Good practice default values

From Dev

Is reclassing exceptions good practice?

From Dev

Is this a good programming practice in Ruby?

From Dev

Good Programming Practice?

From Dev

Integration test good practice

From Dev

Stateless Objects good practice or not

From Dev

Is it a good practice to split CSS?

From Dev

Static factories - good practice?

From Dev

Is caching Fragment a good practice?

From Dev

Is it a good practice to extend NSError

From Dev

How to write with good practice?

From Dev

Exception Handling - is this good practice?

Related Related

HotTag

Archive