Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide query statistics for apoc.merge functions #2239

Closed
process0 opened this issue Oct 5, 2021 · 0 comments · Fixed by #2412
Closed

Provide query statistics for apoc.merge functions #2239

process0 opened this issue Oct 5, 2021 · 0 comments · Fixed by #2412

Comments

@process0
Copy link

process0 commented Oct 5, 2021

Feature description

Currently apoc.merge.node and apoc.merge.relationship functions do not return any query statistics. These functions are often used in UNWIND $data .. queries where the user wants the ability to dynamically create the node and/or relationship label.

These functions generate and execute cypher statements from their inputs, so it should be possible to provide query statistics for them.

Related #1815

Considered alternatives

None that I am aware of

How this feature can improve the project?

It will provide accurate statistics of the queries run. The current statistics returned are 0 for every SummaryCounter field e.g.:

  "counters": {
    "_stats": {
      "nodesCreated": 0,
      "nodesDeleted": 0,
      "relationshipsCreated": 0,
      "relationshipsDeleted": 0,
      "propertiesSet": 0,
      "labelsAdded": 0,
      "labelsRemoved": 0,
      "indexesAdded": 0,
      "indexesRemoved": 0,
      "constraintsAdded": 0,
      "constraintsRemoved": 0
    },
    "_systemUpdates": 0
  },
  "updateStatistics": {
    "_stats": {
      "nodesCreated": 0,
      "nodesDeleted": 0,
      "relationshipsCreated": 0,
      "relationshipsDeleted": 0,
      "propertiesSet": 0,
      "labelsAdded": 0,
      "labelsRemoved": 0,
      "indexesAdded": 0,
      "indexesRemoved": 0,
      "constraintsAdded": 0,
      "constraintsRemoved": 0
    },
    "_systemUpdates": 0
  },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant