Skip to content

Run MATCH with multiple edges query faster #2129

@wgmayer0

Description

@wgmayer0

Is there a way to run this query faster? Maybe a technique I am overlooking? I see that I am running MATCH multiple times and not sure if that has anything to do with it

SELECT concat(a::text, ' / ', b::text, ' / ', c::text, ' / ', d::text, ' / ', e::text) AS concatenated_string
FROM cypher('hermech', $$ 
  MATCH (a:load_number)-[]-(b:origin) 
  MATCH (a)-[]-(c:pickup_time) 
  MATCH (a)-[]-(d:destination) 
  MATCH (a)-[]-(e:delivery_time) 
  MATCH (a)-[]-(d:destination) 
  MATCH (a)-[]-(e:delivery_time) 
  RETURN a.value, b.value, c.value, d.value, e.value
$$) AS (a agtype, b agtype, c agtype, d agtype, e agtype);

It seems to take about 4 seconds

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleStale issues/PRsquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions