GitHub user dosubot[bot] added a comment to the discussion: 结构相同但是不存在关联关系的多个数据集集中放在一个图数据库还是各自放在不同的图数据库性能更好?
<!-- Greeting --> Hey @skysider, I'm here to assist you with any questions or issues you have. I'm a bot designed to help you with bug fixes, answering questions, and becoming a contributor. If you need any help, feel free to ask! <!-- Answer --> 在考虑查询效率和内存占用的情况下,将结构相同但不存在关联关系的多个数据集集中放在一个图数据库还是各自放在不同的图数据库,性能表现会有所不同。 1. **集中放在一个图数据库**: - **查询效率**:HugeGraph 使用 EdgeCut 分区方案,这种方案在高性能插入和更新操作方面表现优异,适合 OLTP 图查询 <sup>[[1]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/en/docs/guides/desgin-concept.md)</sup>。但是,如果查询涉及大量不相关的数据集,查询效率可能会受到影响。 - **内存占用**:EdgeCut 分区方案避免了顶点的多次存储,但可能会导致边的多次存储,这在某些图结构中可能更节省内存 <sup>[[1]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/en/docs/guides/desgin-concept.md)</sup>。 2. **各自放在不同的图数据库**: - **查询效率**:将数据集分开存储可以避免不相关数据集之间的干扰,可能会提高查询效率,特别是当查询主要集中在单个数据集时。 - **内存占用**:分开存储可以更好地控制每个图数据库的内存使用,但需要额外的资源来管理多个图数据库实例。 根据 HugeGraph 的基准测试,单个大图数据库在批量插入和遍历操作中表现优异 <sup>[[2]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/cn/docs/performance/hugegraph-benchmark-0.4.4.md)</sup><sup>[[3]](https://github.com/apache/incubator-hugegraph-doc/blob/master/content/cn/docs/performance/hugegraph-benchmark-0.5.6.md)</sup>。然而,具体选择还需根据实际使用场景和数据集的特点进行权衡。如果查询频繁且数据集之间没有关联,分开存储可能会更合适;如果需要高效的插入和更新操作,集中存储可能更有优势。 <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* GitHub link: https://github.com/apache/incubator-hugegraph/discussions/2546#discussioncomment-9599778 ---- This is an automatically sent email for dev@hugegraph.apache.org. To unsubscribe, please send an email to: dev-unsubscr...@hugegraph.apache.org