nebula icon indicating copy to clipboard operation
nebula copied to clipboard

Enhance property pruning rule

Open czpmango opened this issue 3 years ago • 1 comments

At present, our property pruning optimization only considers the symbols between operators without analyzing specific expressions, so some statements that can be optimized may be ignored. The following statement can prune all properties.

MATCH (v1)-[e:like*1..5]->(v2)
WHERE id(v1) == "Tim Duncan"
RETURN count(v2)

This optimization can not only reduce rpc overhead but also reduce memory pressure during graphd computation.

czpmango avatar Jul 07 '22 06:07 czpmango

Fwiw, some simple aggregations like count(*) can be considered pushed down to the storage layer(Scan or Traverse operator). This may greatly improve the performance of statements like the above.

czpmango avatar Jul 07 '22 06:07 czpmango