Hi all,

I opened https://github.com/apache/age/issues/2586 and wanted to raise it here, 
since it is a performance regression in 1.8.0.

In 1.8.0, every Cypher DELETE / DETACH DELETE statement costs about 1 ms per 
edge label in the graph, even when it matches nothing.
With 150 edge labels, a DETACH DELETE that matches no vertex takes ~165 ms on 
1.8.0 and ~1 ms on 1.7.0.

The cost comes from process_edges_by_index(), added in #2351. 
check_for_connected_edges() calls it twice per edge label, and each
call walks vertex_id_htab with hash_seq_search(). That table is created with 
DELETE_VERTEX_HTAB_SIZE = 1000000, so every walk visits about 1M
buckets, even when it holds zero vertices or one. Rebuilding 1.8.0 with 
DELETE_VERTEX_HTAB_SIZE = 1024 brings the 150-label case down to
~0.55 ms, and DETACH DELETE still removes the right edges.

Our graph has ~120 edge labels, so this adds ~130 ms to every delete, and we 
are keeping production on 1.7.0 for now.
I'm happy to test a fix against our workload.

Thanks,
Ehsan Farasat.

Reply via email to