TuGraph-family / tugraph-db

TuGraph: A High Performance Graph Database.
https://tugraph.org
Apache License 2.0
1.44k stars 192 forks source link

单个子图2801节点2682关系时插入关系耗时3秒多 #542

Closed zhuyuemings closed 4 months ago

zhuyuemings commented 5 months ago

Environment:

Describe the bug

match (n) return count(n)  :2801
match ()-[r]->() return count(r) :2682

执行以下语句耗时3秒(使用java客户端或自带网页客户端都是):

match (n),(m) where id(n)=5821 and id(m)=5822 create (n)-[r:next{id:"-1",graphId:"04efd4e2756a42c09cd15330aa1fef93"}]->(m) set r.id=euid(r) return r

Docker监控:

CONTAINER ID   NAME             CPU %     MEM USAGE / LIMIT     MEM %     NET I/O           BLOCK I/O         PIDS
d9a435c1f1a5   tugraph          0.41%     327.7MiB / 15.38GiB   2.08%     784kB / 12.9MB    15.6MB / 0B       74

How to reproduce and expected behavior

是我使用方式问题吗?

ljcui commented 5 months ago

有些语句的优化还没到位,换种写法,把点的类型和主键字段写在match里面。

match (n:operation {id: 58211}),(m:operation {id: 5822}) 
create (n)-[r:next{id:"-1",graphId:"04efd4e2756a42c09cd15330aa1fef93"}]->(m)
github-actions[bot] commented 4 months ago

Hello @zhuyuemings. Please provide more info for debugging. Issues labeled by more info needed will be closed if no activities in 7 days.

你好 @zhuyuemings, 我们需要你提供更多信息以便于排查问题。7 天内未跟进此 issue 将会被自动关闭。

github-actions[bot] commented 4 months ago

Since this issue was labeled as "more info needed" but no response has been received for 15 days. Now the issue is closed. Please feel free to create a new one with more info if you have more questions.

由于该 issue 被标记为需要更多信息,却 15 天未收到回应。现关闭 issue,若有任何问题,可另开 issue 并提供更多信息。