Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

@DynamicLabels generates non-parametrized query #3043

Open
@zakjan

Description

@DynamicLabels generates non-parametrized query with dynamic node labels REMOVE node:<oldLabels> SET node:<newLabels> (source code).

A non-parametrized query is generated even when there is no change in the dynamic labels, e.g. REMOVE node:LabelA SET node:LabelA for a node entity with dynamic label LabelA.

When the number of dynamic labels is greater than Cypher query cache size (default 1000), this leads into a query cache overflow and causes replanning of other well-parametrized queries.

Since Neo4j 5.26, can node labels can be parametrized in this query as REMOVE node:$($oldLabels) SET node:$($newLabels)?

Node labels from @Node annotation are perfectly fine to be formatted into the query as-is (non-parametrized), as they are ensured to be constants by Java. It's only @DynamicLabels which allow any string causing this issue.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /