You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When querying only for totalCount within a *Connection query, the generated cypher queries and returns too much data resulting in serious performance-issues #6115
Describe the bug
When querying only for totalCount within a *Connection query, database-internal data is returned for each found node-instance resulting in a HUGE response. This totally kills the performance when having many nodes.
See the steps to reproduce. When running this query on our production database with Neo4j Desktop, the app completely dies and shuts down. And we only have around 2m nodes of this type. We have other types with ~80m nodes. Don't want to know what would happen if I executed this query on that type...
The sub-object node with the keys __resolveType and __id is returned for EACH found instance.
Expected behavior
When querying on a connection including onlytotalCount, the irrelevant meta-information should NOT be returned to keep perfomance.
Even to query for is a perfomance killer, I think.
A simple cypher to aim for the count-store only should be sufficient:
MATCH (this0:Norm)
RETURN{totalCount:count(this0)}