Ярослав Станко <new...@...>
Hello!
I get the example : https://github.com/pluradj/janusgraph-java-example
Why is there a warning in the log?
"WARN org.janusgraph.graphdb.transaction.StandardJanusGraphTx - Query requires iterating over all vertices [()]. For better performance, use indexes"
In my project the same thing.
Is this a bug? How to fix it?
|
|
Jason Plurad <plu...@...>
No, it is not a bug. It is a warning letting you know that there is a query that is doing a global scan of all vertices. In this case, the specific call is `g.V().count().next()` which is trying to determine whether there is any data in the graph. Something like `g.V().hasNext()` would be a less expensive check, although it would still issue the warning.
This small example can get away a call like this because there are only 12 vertices in the loaded graph, but it would be an expensive operation if there were 1 billion vertices.
Thanks for the feedback. -- Jason
toggle quoted message
Show quoted text
On Thursday, May 18, 2017 at 12:36:05 PM UTC-4, Ярослав Станко wrote: Hello!
Why is there a warning in the log?
"WARN org.janusgraph.graphdb.transaction.StandardJanusGraphTx - Query requires iterating over all vertices [()]. For better performance, use indexes"
In my project the same thing.
Is this a bug? How to fix it?
|
|
Thanks for the answer. I do not understand a little.
In my case I'm looking for a Vertex: traversalSource.V().has("ip4addressString", addressString); And I get a warning: Query requires iterating over all vertices [(ip4addressString = 192.168.155.212)]. For better performance, use indexes ip4addressString is a unique CompositeIndex. Why is my index not used?
четверг, 18 мая 2017 г., 21:11:03 UTC+3 пользователь Jason Plurad написал:
toggle quoted message
Show quoted text
No, it is not a bug. It is a warning letting you know that there is a query that is doing a global scan of all vertices. In this case, the specific call is `g.V().count().next()` which is trying to determine whether there is any data in the graph. Something like `g.V().hasNext()` would be a less expensive check, although it would still issue the warning. This small example can get away a call like this because there are only 12 vertices in the loaded graph, but it would be an expensive operation if there were 1 billion vertices. Thanks for the feedback. -- Jason On Thursday, May 18, 2017 at 12:36:05 PM UTC-4, Ярослав Станко wrote: Hello!
Why is there a warning in the log?
"WARN org.janusgraph.graphdb.transaction.StandardJanusGraphTx - Query requires iterating over all vertices [()]. For better performance, use indexes"
In my project the same thing.
Is this a bug? How to fix it?
|
|
And one more thing. My index exists and works because
Adding this property for key [ip4addressString] and value [192.168.155.212] violates a uniqueness constraint [compositeIp4addressString]
пятница, 19 мая 2017 г., 12:53:16 UTC+3 пользователь CGen написал:
toggle quoted message
Show quoted text
Thanks for the answer. I do not understand a little.
In my case I'm looking for a Vertex: traversalSource.V().has("ip4addressString", addressString); And I get a warning: Query requires iterating over all vertices [(ip4addressString = 192.168.155.212)]. For better performance, use indexes ip4addressString is a unique CompositeIndex. Why is my index not used?
четверг, 18 мая 2017 г., 21:11:03 UTC+3 пользователь Jason Plurad написал: No, it is not a bug. It is a warning letting you know that there is a query that is doing a global scan of all vertices. In this case, the specific call is `g.V().count().next()` which is trying to determine whether there is any data in the graph. Something like `g.V().hasNext()` would be a less expensive check, although it would still issue the warning. This small example can get away a call like this because there are only 12 vertices in the loaded graph, but it would be an expensive operation if there were 1 billion vertices. Thanks for the feedback. -- Jason On Thursday, May 18, 2017 at 12:36:05 PM UTC-4, Ярослав Станко wrote: Hello!
Why is there a warning in the log?
"WARN org.janusgraph.graphdb.transaction.StandardJanusGraphTx - Query requires iterating over all vertices [()]. For better performance, use indexes"
In my project the same thing.
Is this a bug? How to fix it?
|
|
Jason Plurad <plu...@...>
Can you share your property and index definition?
toggle quoted message
Show quoted text
On Friday, May 19, 2017 at 6:37:09 AM UTC-4, CGen wrote: And one more thing. My index exists and works because
Adding this property for key [ip4addressString] and value [192.168.155.212] violates a uniqueness constraint [compositeIp4addressString]
пятница, 19 мая 2017 г., 12:53:16 UTC+3 пользователь CGen написал: Thanks for the answer. I do not understand a little.
In my case I'm looking for a Vertex: traversalSource.V().has("ip4addressString", addressString); And I get a warning: Query requires iterating over all vertices [(ip4addressString = 192.168.155.212)]. For better performance, use indexes ip4addressString is a unique CompositeIndex. Why is my index not used?
четверг, 18 мая 2017 г., 21:11:03 UTC+3 пользователь Jason Plurad написал: No, it is not a bug. It is a warning letting you know that there is a query that is doing a global scan of all vertices. In this case, the specific call is `g.V().count().next()` which is trying to determine whether there is any data in the graph. Something like `g.V().hasNext()` would be a less expensive check, although it would still issue the warning. This small example can get away a call like this because there are only 12 vertices in the loaded graph, but it would be an expensive operation if there were 1 billion vertices. Thanks for the feedback. -- Jason On Thursday, May 18, 2017 at 12:36:05 PM UTC-4, Ярослав Станко wrote: Hello!
Why is there a warning in the log?
"WARN org.janusgraph.graphdb.transaction.StandardJanusGraphTx - Query requires iterating over all vertices [()]. For better performance, use indexes"
In my project the same thing.
Is this a bug? How to fix it?
|
|
PropertyKey ip4addressStringPropertyKey = mgmt.makePropertyKey("ip4addressString").dataType(String.class).make();
VertexLabel ip4addressVertexLabel = mgmt.makeVertexLabel("ip4address").make();
JanusGraphIndex ip4addressStringIndex = mgmt.buildIndex("compositeIp4addressString", Vertex.class).addKey(ip4addressStringPropertyKey).indexOnly(ip4addressVertexLabel).unique().buildCompositeIndex(); mgmt.setConsistency(ip4addressStringIndex, ConsistencyModifier.LOCK);
пятница, 19 мая 2017 г., 17:36:46 UTC+3 пользователь Jason Plurad написал:
toggle quoted message
Show quoted text
Can you share your property and index definition? On Friday, May 19, 2017 at 6:37:09 AM UTC-4, CGen wrote: And one more thing. My index exists and works because
Adding this property for key [ip4addressString] and value [192.168.155.212] violates a uniqueness constraint [compositeIp4addressString]
пятница, 19 мая 2017 г., 12:53:16 UTC+3 пользователь CGen написал: Thanks for the answer. I do not understand a little.
In my case I'm looking for a Vertex: traversalSource.V().has("ip4addressString", addressString); And I get a warning: Query requires iterating over all vertices [(ip4addressString = 192.168.155.212)]. For better performance, use indexes ip4addressString is a unique CompositeIndex. Why is my index not used?
четверг, 18 мая 2017 г., 21:11:03 UTC+3 пользователь Jason Plurad написал: No, it is not a bug. It is a warning letting you know that there is a query that is doing a global scan of all vertices. In this case, the specific call is `g.V().count().next()` which is trying to determine whether there is any data in the graph. Something like `g.V().hasNext()` would be a less expensive check, although it would still issue the warning. This small example can get away a call like this because there are only 12 vertices in the loaded graph, but it would be an expensive operation if there were 1 billion vertices. Thanks for the feedback. -- Jason On Thursday, May 18, 2017 at 12:36:05 PM UTC-4, Ярослав Станко wrote: Hello!
Why is there a warning in the log?
"WARN org.janusgraph.graphdb.transaction.StandardJanusGraphTx - Query requires iterating over all vertices [()]. For better performance, use indexes"
In my project the same thing.
Is this a bug? How to fix it?
|
|
Kevin Schmidt <ktsc...@...>
So the "indexOnly(ip4addressVertexLabel)" is a label constraint and means this index only applies to traversals that specify that vertex label.
If you simply change your traversal to this, the index should be used:
traversalSource.V().hasLabel("ip4address").has("ip4addressString", addressString);
toggle quoted message
Show quoted text
On Fri, May 19, 2017 at 10:57 AM, CGen <new...@...> wrote: PropertyKey ip4addressStringPropertyKey = mgmt.makePropertyKey("ip4addressString").dataType(String.class).make();
VertexLabel ip4addressVertexLabel = mgmt.makeVertexLabel("ip4address").make();
JanusGraphIndex ip4addressStringIndex = mgmt.buildIndex("compositeIp4addressString", Vertex.class).addKey(ip4addressStringPropertyKey).indexOnly(ip4addressVertexLabel).unique().buildCompositeIndex(); mgmt.setConsistency(ip4addressStringIndex, ConsistencyModifier.LOCK);
пятница, 19 мая 2017 г., 17:36:46 UTC+3 пользователь Jason Plurad написал:Can you share your property and index definition? On Friday, May 19, 2017 at 6:37:09 AM UTC-4, CGen wrote: And one more thing. My index exists and works because
Adding this property for key [ip4addressString] and value [192.168.155.212] violates a uniqueness constraint [compositeIp4addressString]
пятница, 19 мая 2017 г., 12:53:16 UTC+3 пользователь CGen написал: Thanks for the answer. I do not understand a little.
In my case I'm looking for a Vertex: traversalSource.V().has("ip4addressString", addressString); And I get a warning: Query requires iterating over all vertices [(ip4addressString = 192.168.155.212)]. For better performance, use indexes ip4addressString is a unique CompositeIndex. Why is my index not used?
четверг, 18 мая 2017 г., 21:11:03 UTC+3 пользователь Jason Plurad написал: No, it is not a bug. It is a warning letting you know that there is a query that is doing a global scan of all vertices. In this case, the specific call is `g.V().count().next()` which is trying to determine whether there is any data in the graph. Something like `g.V().hasNext()` would be a less expensive check, although it would still issue the warning. This small example can get away a call like this because there are only 12 vertices in the loaded graph, but it would be an expensive operation if there were 1 billion vertices. Thanks for the feedback. -- Jason On Thursday, May 18, 2017 at 12:36:05 PM UTC-4, Ярослав Станко wrote: Hello!
Why is there a warning in the log?
"WARN org.janusgraph.graphdb.transaction.StandardJanusGraphTx - Query requires iterating over all vertices [()]. For better performance, use indexes"
In my project the same thing.
Is this a bug? How to fix it?
--
You received this message because you are subscribed to the Google Groups "JanusGraph users list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to janusgraph-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
|
|
Jason Plurad <plu...@...>
Ah, you used indexOnly() to restrict the index by vertex label, so in order to utilize the index, your query must include the vertex label. Either of these would work since ultimately they are optimized to the same traversal: g.V().hasLabel("ip4address").has("ip4addressString", "192.168.155.212") g.V().has("ip4address", "ip4addressString", "192.168.155.212")
toggle quoted message
Show quoted text
On Friday, May 19, 2017 at 1:57:25 PM UTC-4, CGen wrote: PropertyKey ip4addressStringPropertyKey = mgmt.makePropertyKey("ip4addressString").dataType(String.class).make();
VertexLabel ip4addressVertexLabel = mgmt.makeVertexLabel("ip4address").make();
JanusGraphIndex ip4addressStringIndex = mgmt.buildIndex("compositeIp4addressString", Vertex.class).addKey(ip4addressStringPropertyKey).indexOnly(ip4addressVertexLabel).unique().buildCompositeIndex(); mgmt.setConsistency(ip4addressStringIndex, ConsistencyModifier.LOCK);
пятница, 19 мая 2017 г., 17:36:46 UTC+3 пользователь Jason Plurad написал:Can you share your property and index definition? On Friday, May 19, 2017 at 6:37:09 AM UTC-4, CGen wrote: And one more thing. My index exists and works because
Adding this property for key [ip4addressString] and value [192.168.155.212] violates a uniqueness constraint [compositeIp4addressString]
пятница, 19 мая 2017 г., 12:53:16 UTC+3 пользователь CGen написал: Thanks for the answer. I do not understand a little.
In my case I'm looking for a Vertex: traversalSource.V().has("ip4addressString", addressString); And I get a warning: Query requires iterating over all vertices [(ip4addressString = 192.168.155.212)]. For better performance, use indexes ip4addressString is a unique CompositeIndex. Why is my index not used?
четверг, 18 мая 2017 г., 21:11:03 UTC+3 пользователь Jason Plurad написал: No, it is not a bug. It is a warning letting you know that there is a query that is doing a global scan of all vertices. In this case, the specific call is `g.V().count().next()` which is trying to determine whether there is any data in the graph. Something like `g.V().hasNext()` would be a less expensive check, although it would still issue the warning. This small example can get away a call like this because there are only 12 vertices in the loaded graph, but it would be an expensive operation if there were 1 billion vertices. Thanks for the feedback. -- Jason On Thursday, May 18, 2017 at 12:36:05 PM UTC-4, Ярослав Станко wrote: Hello!
Why is there a warning in the log?
"WARN org.janusgraph.graphdb.transaction.StandardJanusGraphTx - Query requires iterating over all vertices [()]. For better performance, use indexes"
In my project the same thing.
Is this a bug? How to fix it?
|
|
Thanks to all. It works as it should.
пятница, 19 мая 2017 г., 21:44:46 UTC+3 пользователь Jason Plurad написал:
toggle quoted message
Show quoted text
Ah, you used indexOnly() to restrict the index by vertex label, so in order to utilize the index, your query must include the vertex label. Either of these would work since ultimately they are optimized to the same traversal: g.V().hasLabel("ip4address").has("ip4addressString", "192.168.155.212") g.V().has("ip4address", "ip4addressString", "192.168.155.212")
On Friday, May 19, 2017 at 1:57:25 PM UTC-4, CGen wrote: PropertyKey ip4addressStringPropertyKey = mgmt.makePropertyKey("ip4addressString").dataType(String.class).make();
VertexLabel ip4addressVertexLabel = mgmt.makeVertexLabel("ip4address").make();
JanusGraphIndex ip4addressStringIndex = mgmt.buildIndex("compositeIp4addressString", Vertex.class).addKey(ip4addressStringPropertyKey).indexOnly(ip4addressVertexLabel).unique().buildCompositeIndex(); mgmt.setConsistency(ip4addressStringIndex, ConsistencyModifier.LOCK);
пятница, 19 мая 2017 г., 17:36:46 UTC+3 пользователь Jason Plurad написал:Can you share your property and index definition? On Friday, May 19, 2017 at 6:37:09 AM UTC-4, CGen wrote: And one more thing. My index exists and works because
Adding this property for key [ip4addressString] and value [192.168.155.212] violates a uniqueness constraint [compositeIp4addressString]
пятница, 19 мая 2017 г., 12:53:16 UTC+3 пользователь CGen написал: Thanks for the answer. I do not understand a little.
In my case I'm looking for a Vertex: traversalSource.V().has("ip4addressString", addressString); And I get a warning: Query requires iterating over all vertices [(ip4addressString = 192.168.155.212)]. For better performance, use indexes ip4addressString is a unique CompositeIndex. Why is my index not used?
четверг, 18 мая 2017 г., 21:11:03 UTC+3 пользователь Jason Plurad написал: No, it is not a bug. It is a warning letting you know that there is a query that is doing a global scan of all vertices. In this case, the specific call is `g.V().count().next()` which is trying to determine whether there is any data in the graph. Something like `g.V().hasNext()` would be a less expensive check, although it would still issue the warning. This small example can get away a call like this because there are only 12 vertices in the loaded graph, but it would be an expensive operation if there were 1 billion vertices. Thanks for the feedback. -- Jason On Thursday, May 18, 2017 at 12:36:05 PM UTC-4, Ярослав Станко wrote: Hello!
Why is there a warning in the log?
"WARN org.janusgraph.graphdb.transaction.StandardJanusGraphTx - Query requires iterating over all vertices [()]. For better performance, use indexes"
In my project the same thing.
Is this a bug? How to fix it?
|
|
I have the similar problem, query is not use index:
version: janusGraph 0.3.0-SNAPSHOT backend: hbase external index: solr6.6 cluster
Schema definition: VertexLabel user = mgmt.makeVertexLabel("user").make(); JanusGraphManagement.IndexBuilder userIndex = mgmt.buildIndex(“indexName”, Vertex.class); PropertyKey propertyKey = mgmt.makePropertyKey(“actorId”).dataType(String.class).make(); JanusGraphManagement.IndexBuilder userIndex = mgmt.makePropertyKey(u).dataType(propertyFields.get(u)).make() userIndex.addKey(propertyKey) userIndex.indexOnly(user).buildMixedIndex(“Solr_INDEX”);
data ingested to Hbase and Solr fine, but the following query has warning message:
vertex = g.V().has(vertexLabel, “actorId”, “TT3222957655”).next();
WARN org.janusgraph.graphdb.transaction.StandardJanusGraphTx - Query requires iterating over all vertices [(~label = user AND actorId = TT3222957655)]. For better performance, use indexes.
Need help ...
toggle quoted message
Show quoted text
On Friday, 19 May 2017 11:44:46 UTC-7, Jason Plurad wrote: Ah, you used indexOnly() to restrict the index by vertex label, so in order to utilize the index, your query must include the vertex label. Either of these would work since ultimately they are optimized to the same traversal: g.V().hasLabel("ip4address").has("ip4addressString", "192.168.155.212") g.V().has("ip4address", "ip4addressString", "192.168.155.212")
On Friday, May 19, 2017 at 1:57:25 PM UTC-4, CGen wrote: PropertyKey ip4addressStringPropertyKey = mgmt.makePropertyKey("ip4addressString").dataType(String.class).make();
VertexLabel ip4addressVertexLabel = mgmt.makeVertexLabel("ip4address").make();
JanusGraphIndex ip4addressStringIndex = mgmt.buildIndex("compositeIp4addressString", Vertex.class).addKey(ip4addressStringPropertyKey).indexOnly(ip4addressVertexLabel).unique().buildCompositeIndex(); mgmt.setConsistency(ip4addressStringIndex, ConsistencyModifier.LOCK);
пятница, 19 мая 2017 г., 17:36:46 UTC+3 пользователь Jason Plurad написал:Can you share your property and index definition? On Friday, May 19, 2017 at 6:37:09 AM UTC-4, CGen wrote: And one more thing. My index exists and works because
Adding this property for key [ip4addressString] and value [192.168.155.212] violates a uniqueness constraint [compositeIp4addressString]
пятница, 19 мая 2017 г., 12:53:16 UTC+3 пользователь CGen написал: Thanks for the answer. I do not understand a little.
In my case I'm looking for a Vertex: traversalSource.V().has("ip4addressString", addressString); And I get a warning: Query requires iterating over all vertices [(ip4addressString = 192.168.155.212)]. For better performance, use indexes ip4addressString is a unique CompositeIndex. Why is my index not used?
четверг, 18 мая 2017 г., 21:11:03 UTC+3 пользователь Jason Plurad написал: No, it is not a bug. It is a warning letting you know that there is a query that is doing a global scan of all vertices. In this case, the specific call is `g.V().count().next()` which is trying to determine whether there is any data in the graph. Something like `g.V().hasNext()` would be a less expensive check, although it would still issue the warning. This small example can get away a call like this because there are only 12 vertices in the loaded graph, but it would be an expensive operation if there were 1 billion vertices. Thanks for the feedback. -- Jason On Thursday, May 18, 2017 at 12:36:05 PM UTC-4, Ярослав Станко wrote: Hello!
Why is there a warning in the log?
"WARN org.janusgraph.graphdb.transaction.StandardJanusGraphTx - Query requires iterating over all vertices [()]. For better performance, use indexes"
In my project the same thing.
Is this a bug? How to fix it?
|
|
On Saturday, 11 November 2017 22:55:37 UTC-8, g...@... wrote: I have the similar problem, query is not use index:
version: janusGraph 0.3.0-SNAPSHOT backend: hbase external index: solr6.6 cluster
Schema definition: VertexLabel user = mgmt.makeVertexLabel("user").make(); JanusGraphManagement.IndexBuilder userIndex = mgmt.buildIndex(“indexName”, Vertex.class); PropertyKey propertyKey = mgmt.makePropertyKey(“actorId”).dataType(String.class).make(); JanusGraphManagement.IndexBuilder userIndex = mgmt.makePropertyKey(u).dataType(propertyFields.get(u)).make() userIndex.addKey(propertyKey) userIndex.indexOnly(user).buildMixedIndex(“Solr_INDEX”);
data ingested to Hbase and Solr fine, but the following query has warning message:
vertex = g.V().has(user, “actorId”, “TT3222957655”).next();
WARN org.janusgraph.graphdb. transaction. StandardJanusGraphTx - Query requires iterating over all vertices [(~label = user AND actorId = TT3222957655)]. For better performance, use indexes. Need help ... On Friday, 19 May 2017 11:44:46 UTC-7, Jason Plurad wrote: Ah, you used indexOnly() to restrict the index by vertex label, so in order to utilize the index, your query must include the vertex label. Either of these would work since ultimately they are optimized to the same traversal: g.V().hasLabel("ip4address").has("ip4addressString", "192.168.155.212") g.V().has("ip4address", "ip4addressString", "192.168.155.212")
On Friday, May 19, 2017 at 1:57:25 PM UTC-4, CGen wrote: PropertyKey ip4addressStringPropertyKey = mgmt.makePropertyKey("ip4addressString").dataType(String.class).make();
VertexLabel ip4addressVertexLabel = mgmt.makeVertexLabel("ip4address").make();
JanusGraphIndex ip4addressStringIndex = mgmt.buildIndex("compositeIp4addressString", Vertex.class).addKey(ip4addressStringPropertyKey).indexOnly(ip4addressVertexLabel).unique().buildCompositeIndex(); mgmt.setConsistency(ip4addressStringIndex, ConsistencyModifier.LOCK);
пятница, 19 мая 2017 г., 17:36:46 UTC+3 пользователь Jason Plurad написал:Can you share your property and index definition? On Friday, May 19, 2017 at 6:37:09 AM UTC-4, CGen wrote: And one more thing. My index exists and works because
Adding this property for key [ip4addressString] and value [192.168.155.212] violates a uniqueness constraint [compositeIp4addressString]
пятница, 19 мая 2017 г., 12:53:16 UTC+3 пользователь CGen написал: Thanks for the answer. I do not understand a little.
In my case I'm looking for a Vertex: traversalSource.V().has("ip4addressString", addressString); And I get a warning: Query requires iterating over all vertices [(ip4addressString = 192.168.155.212)]. For better performance, use indexes ip4addressString is a unique CompositeIndex. Why is my index not used?
четверг, 18 мая 2017 г., 21:11:03 UTC+3 пользователь Jason Plurad написал: No, it is not a bug. It is a warning letting you know that there is a query that is doing a global scan of all vertices. In this case, the specific call is `g.V().count().next()` which is trying to determine whether there is any data in the graph. Something like `g.V().hasNext()` would be a less expensive check, although it would still issue the warning. This small example can get away a call like this because there are only 12 vertices in the loaded graph, but it would be an expensive operation if there were 1 billion vertices. Thanks for the feedback. -- Jason On Thursday, May 18, 2017 at 12:36:05 PM UTC-4, Ярослав Станко wrote: Hello!
Why is there a warning in the log?
"WARN org.janusgraph.graphdb.transaction.StandardJanusGraphTx - Query requires iterating over all vertices [()]. For better performance, use indexes"
In my project the same thing.
Is this a bug? How to fix it?
|
|
Ankur Goel <ankur...@...>
indexOnly(user) work with composite index only.
toggle quoted message
Show quoted text
On Thursday, May 18, 2017 at 10:06:05 PM UTC+5:30, CGen wrote: Hello!
Why is there a warning in the log?
"WARN org.janusgraph.graphdb.transaction.StandardJanusGraphTx - Query requires iterating over all vertices [()]. For better performance, use indexes"
In my project the same thing.
Is this a bug? How to fix it?
|
|