Domanda

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

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top