Date
1 - 3 of 3
How can I tell if indices are being used in a query (intercepting the log)
Nigel Brown <nigel...@...>
The only way I found was to step through the code. While stepping, I didn't see any logs that were there to be missed. What we really want is for this to be part of the output of the explain step (http://tinkerpop.apache.org/docs/current/reference/#explain-step) but it does not seem to be. |
|
Austin Sharp <austins...@...>
You can set the configuration property 'query-force-index' to true and JanusGraph will throw an exception instead of printing the warning. http://docs.janusgraph.org/0.1.0-SNAPSHOT/config-ref.html#_query I believe there are ways to print out what an optimized traversal looks like and if it is using any index steps. You may also be able to examine the traversal in memory (after you call .hasNext() the first time) and see if it uses the right step or steps, but that's just a guess on my part. On Tuesday, April 18, 2017 at 4:10:11 PM UTC-7, Jamie Lawson wrote:
|
|
Jamie Lawson <jamier...@...>
Trying to write unit tests to determine whether indices are being used. The best indication I've seen is the log message:
I'd like to AUTOMATE that TEST. So I'm trying to intercept whatever gets printed out during the query call and search for "use indices" in the output; if I find it, fail the test. I've shown that I can redirect stdin and stderr, and inspect them appropriately, but I've also found that this does NOT intercept the log messages like the one above. So
|
|