Skip to content

Efficient node selection based on node IDs #1394

Answered by andyfengHKU
JoelLeupp asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

The most common way to select nodes from a large set of IDs is to use list_contains function
E.g.

MATCH (i:inproceeding)-[co:crossref]->(p:proceeding)->[b:belongsToConf]->[conf:conference)
WHERE list_contains([list of record ids], i.id)

In our release v0.0.2, we have a limitation that a List size cannot exceed 4KB. So you might need to chunk your 80,000 ids into 200 ids per batch and run multiple queries. Apologize for this constraint. We will fix it very soon.

Best,
Xiyang

P.S. The UNWIND is also an alternative. It runs out-of-memory because we pick a bad plan. I'll fix it too. But the most performant way should be list_contains because running filter is preferred (from performance …

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@JoelLeupp
Comment options

@andyfengHKU
Comment options

@JoelLeupp
Comment options

@andyfengHKU
Comment options

@JoelLeupp
Comment options

Answer selected by JoelLeupp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants