GitHub user jrgemignani edited a comment on the discussion: How to Optimize Query Performance With Large Edge Label Count?
@jsell-rh I don't have much time to answer this fully,... so possibly more later or if @MuhammadTahaNaveed might want to add something. **Plug**: The latest version 1.7.0 will have indexes (on the label tables) created automatically for id/start_id/end_id. So this should help with baseline performance. There are other fixes that will also help with baseline performance for longer paths and agtype access. **Label alternatives**: I have found using 1 table, instead of multiple label tables, doesn't improve performance as expected. Also, putting the label in the properties is a **bad** idea. The properties are basically json and json access is slow, add to that, using **contains** is even slower. **Things that I have found to improve performance**: indexes, specifying a label whenever possible, not specifying variables that aren't used, rewriting the query. The latter can have a serious impact, provided you think of the query like a pipe or filter. The more you can defer expensive operations (sorting or grouping) until after filtering (WHERE), the better. Also, breaking a query up can change how it is processed - `MATCH (n)-[r1]->(m)-[r2]->(o)` **-->** `MATCH (n)-[r1]->(m), (m)-[r2]->(o)` GitHub link: https://github.com/apache/age/discussions/2314#discussioncomment-15565288 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
