bulk - Titan remove many vertices has poor performance -
Improve performance when removing multiple edges?
I want to be able to remove a large part of the potential part, using Titan (using a large graph in rexster and cassandra).
I want to delete a user "owner" who is not on the list of IDs, and returns the list of IDs whether they still try "both" in the graph. , Of which both of them take very long. I have a bad situation where list_of_ids_to_keep
is empty ( []
).
// Def error_mulitple (graph, user_id, list_of_ids_to_keep) {U = get_or_create_user (g, user_id) user_things = u.outE ('owner' ) Investment related decision makers () collect {it.id} removees = user_things - .. List_of_ids_to_keep GV (* (removees)) .remove () // This approach g.commit () is a slow (part of the user_things - removees)} // approach using hash to reduce potential memory footprint and O-marking Doing, but still taking a long time. Def delete_multiple_hash (graph, user_id, list_of_ids_to_keep) {def U = get_or_create_user (g, user_id) DEF user_things = u.outE ('owner') Investment related decision makers () {} it.id def inUserGraph = collect. [:] Def keeper = [:] List_of_ids_to_keep.each {k_id - & gt; InUserGraph [k_id] = true} user_things.each {k_id - & gt; If (! Users [k_id]) {g.v (k_id) .remove () // again: Removed is the slow part; Other {Keepers & lt; & Lt; K_id}} g.commit () Return Keeper}
There, to stop some investigations using some type of bulk operation, to improve its performance Is there a way to implement an async tax query, or any other strategy?
I have already enabled "storage.batch-loading" which I can still improve performance. I measure the question time to approximately 150 seconds, but then nothing is done, so I believe this time is ending.
The layout of the graph is:
User (-NS->) A thing (-en->) A description (many "A Thing" by S. Can be shared)
Number:
username-> ~ = 200K "One Thing" (GV (User_ID) Oute ('boss'). Count () ~ = 200's) One thing - Ana-> ~ = 100 "A Description" s (gv (a_thing_id) .oute ('contains'). Count () ~ = 100) Details & lt; -contains- ~ = 100 "one thing" (gv (a_description_id) .in ('included'). Calculation ~ = 100)
Comments
Post a Comment