GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Unwind edge creation infinite time/super slow · Issue #1713 · ArcadeData/arcadedb

Unwind edge creation infinite time/super slow #1713

New issue
Copy link
New issue
Copy link
Closed
Closed
Unwind edge creation infinite time/super slow#1713
Copy link
Assignees
lvca
Labels
wontfixThis will not be worked on
Milestone
24.10.1

Description

@ExtReMLapin
ExtReMLapin
opened on Sep 5, 2024
Issue body actions

Hello

ArcadeDB Version:

ArcadeDB Server v24.6.1 (build fbc1c77c7e1c52197abdd8661e5b34749babf3d6/1721708610769/main)

OS and JDK Version:

Running on Linux 6.5.0-41-generic - OpenJDK 64-Bit Server VM 11.0.23

Expected behavior

Non slow/infinite time request

Actual behavior

Well the query is slow as hell

Steps to reproduce

Before the release of our tool we're doing "fuzzing" or just trying absurd quantity of thing with absurd quantity of data.

We realized we need to optimize our queries by not creating one edge by one edge and batching it.

Issue is that ... it's not helping.

Creating 5 edges (batches with UNWIND in Cypher) is ... stuck

Attached database :
transports.zip

Query ran in Postman.

URL: api/v1/query/TRANSPORTSEASY

Body :

{
  "command": "        UNWIND $batch as row\n        MATCH (a), (b)\n        WHERE ID(a) = row.source_id AND ID(b) = row.target_id\n        CREATE (a)-[r:RELATION {relation_type: row.relation_type}]->(b)\n        SET r.similarity = row.features.similarity RETURN a, b, r\n",
  "language": "cypher",
  "params": {
    "batch": [
      {
        "source_id": "#22:8200",
        "target_id": "#1:0",
        "relation_type": "smiliar",
        "features": {
          "similarity": 1
        }
      },
      {
        "source_id": "#22:8200",
        "target_id": "#7:8198",
        "relation_type": "smiliar",
        "features": {
          "similarity": 1
        }
      },
      {
        "source_id": "#22:8200",
        "target_id": "#10:8199",
        "relation_type": "smiliar",
        "features": {
          "similarity": 1
        }
      },
      {
        "source_id": "#22:8200",
        "target_id": "#13:8199",
        "relation_type": "smiliar",
        "features": {
          "similarity": 1
        }
      },
      {
        "source_id": "#22:8200",
        "target_id": "#16:8199",
        "relation_type": "smiliar",
        "features": {
          "similarity": 1
        }
      },
      {
        "source_id": "#22:8200",
        "target_id": "#19:8199",
        "relation_type": "smiliar",
        "features": {
          "similarity": 1
        }
      }
    ]
  }
}

Multi line cypher query is :

UNWIND $batch as row
        MATCH (a), (b)
        WHERE ID(a) = row.source_id AND ID(b) = row.target_id
        CREATE (a)-[r:RELATION {relation_type: row.relation_type}]->(b)
        SET r.similarity = row.features.similarity RETURN a, b, r

Editing the query to make batch list empty fixes the issue.

Activity

  1. ExtReMLapin commented on Sep 5, 2024

    @ExtReMLapin
    ExtReMLapin
    on Sep 5, 2024
    ContributorAuthor
    More actions

    On the contrary, no issue with query :

    MATCH (a), (b)
    WHERE ID(a) = "#22:8200" AND ID(b) = "#1:0"
    MERGE (a)-[r:RELATION {relation_type: "similiar"}]->(b)
    SET r.similarity = 0.2 RETURN a, b, r 
  2. ExtReMLapin commented on Sep 5, 2024

    @ExtReMLapin
    ExtReMLapin
    on Sep 5, 2024
    ContributorAuthor
    More actions

    I managed to break down to a working UNWIND example and a non working one :

    DOES NOT WORK :

    UNWIND $batch as row
            MATCH (a), (b)
            WHERE ID(a) = row.source_id AND ID(b) = row.target_id
       RETURN a, b
    

    WORKS :

    UNWIND $batch as row
            MATCH (a) WHERE ID(a) = row.source_id 
            MATCH(b) where ID(b) = row.target_id 
        RETURN a, b
    

    God knows why

  3. lvca commented on Sep 5, 2024

    @lvca
    lvca
    on Sep 5, 2024
    Member
    More actions

    Unfortunately, our Cypher layer transforms into Gremlin and we have little control over it. In the past, we provided patches on our side, but it's pretty hard to work with that codebase, especially because there is no documentation (Neo4j abandoned the project a long time ago).

    My suggestion is to find a workaround in Cypher or use an SQL query for that.

  4. lvca
    closed this as completedon Sep 5, 2024
  5. lvca
    self-assigned this
    on Sep 5, 2024
  6. lvca
    added
    wontfixThis will not be worked on
    on Sep 5, 2024
  7. lvca
    added this to the 24.8.1 milestone on Sep 5, 2024
  8. ExtReMLapin commented on Sep 5, 2024

    @ExtReMLapin
    ExtReMLapin
    on Sep 5, 2024
    ContributorAuthor
    More actions

    Thanks for the answer,

    Now I understand why they call it Gremlin

    Reacted by Christian Himpe and Luca Garulli
  9. mergify
    added a commit that references this issue on Jan 22, 2026

    chore(studio-deps)(deps): bump pdfmake from 0.3.2 to 0.3.3 in /studio…

    d0f8274
  10. mergify
    added a commit that references this issue on Mar 4, 2026

    chore(deps): bump org.neo4j.driver:neo4j-java-driver from 5.28.10 to …

    edc0be1
  11. tae898
    added 2 commits that reference this issue on Jun 28, 2026

    chore(studio-deps)(deps): bump pdfmake from 0.3.2 to 0.3.3 in /studio…

    ff125c1

    chore(deps): bump org.neo4j.driver:neo4j-java-driver from 5.28.10 to …

    e8bedb4
  12. mergify
    added a commit that references this issue on Aug 30, 2026

    chore(deps): bump the github-actions group with 5 updates [skip ci]

    a12f5d9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @lvca
    lvca

Labels

wontfixThis will not be worked on

Type

No type

Projects

No projects

    Milestone

    • 24.10.1

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.