-
Notifications
You must be signed in to change notification settings - Fork 417
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
Run MATCH with multiple edges query faster #2129
Labels
question
Further information is requested
Comments
wgmayer0
changed the title
Run this query faster
Run MATCH with multiple edsges query faster
Nov 4, 2024
wgmayer0
changed the title
Run MATCH with multiple edsges query faster
Run MATCH with multiple edges query faster
Nov 4, 2024
You have a couple of duplicate match clauses, this would be more concise:
|
Thanks. As far as performance (time until query completes) is there no
improvement possible? If not maybe I can work on some
cacheing solution where nodejs queries it
in the bqckground so that its up to date
…On Wed, Nov 13, 2024 at 7:13 PM bravius ***@***.***> wrote:
You have a couple of duplicate match clauses, this would be more concise:
MATCH (a:load_number)-[]-(b:origin),
(a)-[]-(c:pickup_time),
(a)-[]-(d:destination),
(a)-[]-(e:delivery_time)
RETURN a.value, b.value, c.value, d.value, e.value
—
Reply to this email directly, view it on GitHub
<#2129 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARTB5TPPVFTKHNLRS22LBJ32APTLHAVCNFSM6AAAAABRERBAEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZVGA4DEMBZGU>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
@MuhammadTahaNaveed do you think your PR (#2117) will improve the query performance in this specific case as well ? |
If your edges are all directed the same, you could add directed arrows,
Also, if you use different labels for each connection type and specify the name, that will also improve the performance
|
Excellent feedback!! Thank you!
…On Wed, Nov 20, 2024 at 6:13 PM tronper123 ***@***.***> wrote:
If your edges are all directed the same, you could add directed arrows,
MATCH (a:load_number)-[]->(b:origin),
(a)-[]->(c:pickup_time),
(a)-[]->(d:destination),
(a)-[]->(e:delivery_time)
RETURN a.value, b.value, c.value, d.value, e.value
Also, if you use different labels for each connection type and specify the
name, that will also improve the performance
MATCH (a:load_number)-[:orgin_label]-(b:origin),
(a)-[:pickup_label]-(c:pickup_time),
(a)-[:destination_label]-(d:destination),
(a)-[:delivery_label]-(e:delivery_time)
RETURN a.value, b.value, c.value, d.value, e.value
—
Reply to this email directly, view it on GitHub
<#2129 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ARTB5TLBPTLQG43Y5EZIDFL2BUJQRAVCNFSM6AAAAABRERBAEWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOBZG4ZDIMBWGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
It seems to take about 4 seconds
The text was updated successfully, but these errors were encountered: