GitHub user MuhammadTahaNaveed added a comment to the discussion: How to Optimize Query Performance With Large Edge Label Count?
@jsell-rh > With >=3k edge label tables, is Apache AGE's label=table architecture fundamentally limiting for our scale? Yes, especially for label agnostic or broad traversals. > Does AGE perform any in-memory query optimization or caching beyond standard Postgres? You might want to try VLE. It loads the graph in memory. `MATCH (n)-[r *1..2]->(o)` > Views/caching layers that can provide the labels connected to a certain node > label so that queries can quickly specify only the connected labels. This might help. I worked on this earlier and was able to make [label pruning](https://github.com/MuhammadTahaNaveed/age/tree/label_pruning) work. I don’t remember off the top of my head the problem I was facing due to which I didn’t get that work out. I will try to revisit this work. > Modifying the graph creation methodology to prioritize minimal label counts. Probably, the best solution for your case. At this scale, labels should act as high level semantic categories, not as fine-grained types. Using labels for highly granular distinctions works against the relational planner, which we currently rely on, because it turns what is logically a single edge set into thousands of physical relations. Its probably best for you to collapse many fine grained labels into fewer coarse labels and encode the subtype as a property. You may then create an index on those subtypes, e.g. `CREATE INDEX ON label (_agtype_access_operator(VARIADIC ARRAY[properties, '"subtype"'::agtype])` GitHub link: https://github.com/apache/age/discussions/2314#discussioncomment-15569381 ---- This is an automatically sent email for [email protected]. To unsubscribe, please send an email to: [email protected]
