You can also click the multiple check box to enroll your batch of people into more than one class at a time. After the system finishes processing the enrollment update, it will return you to the report screen.If you have more than 50 memberships that you need to update, you can use the page forward arrow button to move to the next 50 records.To achieve that, you just prefix your regular WITH as data, [k in keys() | to Int(k)] as ids MATCH (n) WHERE id(n) IN ids // single property value SET n.count = data[to String(id(n))] // or override all properties SET n = data[to String(id(n))] // or add all properties SET n = data[to String(id(n))], which is meant to iterate over a list of items and execute update operations for each of them.A list of 0 or 1 elements can serve as a conditional of false and true, i.e., no iteration or one iteration.General idea: As mentioned at the beginning, huge transactions are a problem. The first statement provides the data to operate on and can produce a huge (many millions) stream of data (nodes, rels, scalar values). It is called for each item, but a new transaction is created only for each batch of items.You can update a million records with around 2G-4G of heap, but it gets difficult with larger volumes. (There is a new variant of this which will go into the next version of APOC that actually does an variant of the second statement, so it executes only one inner statement per tx.) So, for example, your first statement returns five million nodes to update with a computed value.Use the same workflow of selecting all, then clicking the batch update button to access the tab to add enrollments to the next batch of 50 memberships.
Each query can update from a single property to a whole subgraph (100 nodes) but has to be the same in the overall structure for caching.If you try them out and are successful, please let me know.If you have any other tricks that helped you to achieve more write throughput with Cypher, please let me know, too, and I’ll update this post.If your updates are independent of each other (think the creation of nodes or updates of properties, or updates of independent subgraphs), then you can run this procedure with a RETURN from Pairs([["alice",38],["bob",42],...]) // RETURN from Lists(["alice","bob",...],[38,42]) // // groups nodes, relationships, maps by key, good for quick lookups by that key RETURN group By([,],"gender") // RETURN group By Multi([,,],"gender") // RETURN merge(,) // RETURN set Key(,"bob",42) // RETURN remove Key(,"alice") // RETURN remove Key(,["alice","bob","charlie"]) // // remove the given keys and values, good for data from load-csv/json/jdbc/xml RETURN clean(,["ssn"],["n/a",""]) // I used these approaches successfully for high-volume update operations, and also in the implementation of object graph mappers for bulk updates.Of course, you can combine these variants for more complex operations.