Re: Count Query Optimization


Vinayak Bali
 

Hi All, 

The solution from BO XUAN LI to change config files worked for the following query:
g.V().has('property1', 'A').as('v1').outE().has('property1','E').as('e').inV().has('property1', 'B').as('v2').select('v1','e','v2').dedup().count()

But not for the following query:
g.V().has('property1', 'A').aggregate('v').outE().has('property1','E').aggregate('e').inV().has('property1', 'B').aggregate('v').select('v').dedup().as('vetexCount').select('e').dedup().as('edgeCount').select('vetexCount','edgeCount').by(unfold().count())

I need an optimized query to get both nodes, as well as edges, count. Request you to provide your valuable feedback and help me to achieve it.

Thanks & Regards,
Vinayak


On Sat, Mar 13, 2021 at 8:16 AM BO XUAN LI <liboxuan@...> wrote:
Apart from rewriting the query, there are some config options (https://docs.janusgraph.org/basics/configuration-reference/#query) worth trying:

1) Turn on query.batch
2) Turn off 
query.fast-property

Join janusgraph-users@lists.lfaidata.foundation to automatically receive all group messages.