NebulaGraph v3.5.0 性能测试报告(中)
查询带边属性 count
GO {} STEP FROM {} OVER KNOWS yield KNOWS.creationDate | return count(*) ;
一跳·吞吐率
一跳·服务端耗时(ms)
一跳·客户端耗时(ms)
二跳·吞吐率
二跳·服务端耗时(ms)
二跳·客户端耗时(ms)
三跳·吞吐率
三跳·服务端耗时(ms)
三跳·客户端耗时(ms)
查询带目的点属性 count
GO 1 STEP FROM {} OVER KNOWS yield $$.Person.firstName | return count(*)
一跳·吞吐率
一跳·服务端耗时(ms)
一跳·客户端耗时(ms)
二跳·吞吐率
二跳·服务端耗时(ms)
二跳·客户端耗时(ms)
三跳·吞吐率
三跳·服务端耗时(ms)
三跳·客户端耗时(ms)
LOOKUP count
LOOKUP ON Person WHERE Person.firstName == '{}' YIELD Person.firstName | return count(*)
吞吐率
服务端耗时(ms)
客户端耗时(ms)
MATCH count
MATCH (v:Person) WHERE v.Person.firstName == '{}' RETURN count(*)
吞吐率
服务端耗时(ms)
客户端耗时(ms)
MATCH 一跳 count
MATCH (v1:Person)-[e:KNOWS]->(v2:Person) WHERE id(v1) == {} RETURN count(*)
吞吐率
服务端耗时(ms)
客户端耗时(ms)
MATCH 两跳 count
MATCH (v1:Person)-[e:KNOWS*2]->(v2:Person) WHERE id(v1) == {} RETURN count(*)
吞吐率
服务端耗时(ms)
客户端耗时(ms)
插入点
INSERT VERTEX Comment (creationDate, locationIP, browserUsed, content, length) VALUES {}:('{}', '{}', '{}', '{}', {})
吞吐率
服务端耗时(ms)
客户端耗时(ms)
插入边
INSERT EDGE LIKES (creationDate) VALUES {}→{}:('{}')
吞吐率
服务端耗时(ms)
客户端耗时(ms)
插入带索引的点
INSERT VERTEX Person (firstName,lastName,gender,birthday,creationDate,locationIP,browserUsed) VALUES {0}:(\"{1}\", \"{2}\",\"{3}\",\"{4}\",datetime(\"{5}\"), \"{6}\",\"{7}\")
吞吐率
服务端耗时(ms)
客户端耗时(ms)
插入带索引的边
INSERT EDGE WORK_AT (workFrom) VALUES {0}→{1}:({2})
吞吐率
服务端耗时(ms)
客户端耗时(ms)
3.5.0 vs 3.4.0(Baseline)
以下数据选取 P99 值。
查询带边属性
GO {} STEP FROM {} OVER KNOWS yield KNOWS.creationDate
一跳·吞吐率
一跳·服务端耗时(ms)
一跳·客户端耗时(ms)
二跳·吞吐率
二跳·服务端耗时(ms)
二跳·客户端耗时(ms)
三跳·吞吐率
三跳·服务端耗时(ms)
三跳·客户端耗时(ms)
查询带目的点属性
GO {} STEP FROM {} OVER KNOWS yield $$.Person.firstName
一跳·吞吐率
一跳·服务端耗时(ms)
一跳·客户端耗时(ms)
二跳·吞吐率
二跳·服务端耗时(ms)
二跳·客户端耗时(ms)
三跳·吞吐率
三跳·服务端耗时(ms)
三跳·客户端耗时(ms)
查询带边属性+目的点属性
GO {} STEP FROM {} OVER KNOWS yield DISTINCT KNOWS.creationDate as t, $$.Person.firstName, $$.Person.lastName, $$.Person.birthday as birth | order by $-.t, $-.birth | limit 10
一跳·吞吐率
一跳·服务端耗时(ms)
一跳·客户端耗时(ms)
二跳·吞吐率
二跳·服务端耗时(ms)
二跳·客户端耗时(ms)
三跳·吞吐率
三跳·服务端耗时(ms)
三跳·客户端耗时(ms)
LOOKUP
LOOKUP ON Person WHERE Person.firstName == '{}' YIELD Person.firstName, Person.lastName, Person.gender, Person.birthday, Person.creationDate, Person.locationIP, Person.browserUsed
LOOKUP·吞吐率
LOOKUP·服务端耗时(ms)
LOOKUP·客户端耗时(ms)
FETCH 点
FETCH PROP ON Person {} YIELD Person.firstName, Person.lastName, Person.gender, Person.birthday, Person.creationDate, Person.locationIP, Person.browserUsed
FETCH 点·吞吐率
FETCH 点·服务端耗时(ms)
FETCH 点·客户端耗时(ms)
FETCH 边
FETCH PROP ON KNOWS {} -> {} YIELD KNOWS.creationDate
FETCH 边·吞吐率
FETCH 边·服务端耗时(ms)
FETCH 边·客户端耗时(ms)
MATCH 索引
MATCH (v:Person) WHERE v.Person.firstName == '{}' RETURN v
MATCH·吞吐率
MATCH·服务端耗时(ms)
MATCH·客户端耗时(ms)
MATCH 一跳
MATCH (v1:Person)-[e:KNOWS]->(v2:Person) WHERE id(v1) == {} RETURN v2
MATCH 一跳·吞吐率
MATCH 一跳·服务端耗时(ms)
MATCH 一跳·客户端耗时(ms)
MATCH 两跳
MATCH (v1:Person)-[e:KNOWS*2]->(v2:Person) WHERE id(v1) == {} RETURN v2
MATCH 两跳·吞吐率
MATCH 两跳·服务端耗时(ms)
MATCH 两跳·客户端耗时(ms)
MatchTest1
match (v:Person) where id(v) == {} return count(v.Person.firstName)
吞吐率
服务端耗时(ms)
客户端耗时(ms)
MatchTest2
match (v:Person)-[e:KNOWS]-(v2) where id(v) == {} and v2.Person.locationIP != 'yyy' return length(v.Person.browserUsed) + length(v2.Person.gender)
吞吐率
服务端耗时(ms)
客户端耗时(ms)
MatchTest3
match (v:Person)-[e:KNOWS]-(v2) where id(v) == {} and v2.Person.locationIP != 'yyy' with v, v2 as v3 return length(v.Person.browserUsed) + (v3.Person.gender)
吞吐率
服务端耗时(ms)
客户端耗时(ms)
MatchTest4
MATCH (m)-[:KNOWS]-(n) WHERE id(m)=={} OPTIONAL MATCH (n)<-[:KNOWS]-(l) RETURN length(m.Person.lastName) AS n1, length(n.Person.lastName) AS n2, l.Person.creationDate AS n3 ORDER BY n1, n2, n3 LIMIT 10
吞吐率
服务端耗时(ms)
客户端耗时(ms)
MatchTest5
MATCH (m)-[:KNOWS]-(n) WHERE id(m)=={} MATCH (n)-[:KNOWS]-(l) WITH m AS x, n AS y, l RETURN x.Person.firstName AS n1, y.Person.firstName AS n2, CASE WHEN l.Person.firstName is not null THEN l.Person.firstName WHEN l.Person.gender is not null THEN l.Person.birthday ELSE 'null' END AS n3 ORDER BY n1, n2, n3 LIMIT 10
吞吐率
服务端耗时(ms)
客户端耗时(ms)
文章转载自公众号: NebulaGraph