gpt4 book ai didi

OrientDB使用 "DELETE VERTEX ..."SQL语句时不会一次删除所有顶点

转载 作者:行者123 更新时间:2023-12-02 18:54:51 26 4
gpt4 key购买 nike

我在 VehicleHistoryGraph 数据库中创建了一个 Message 类型的顶点,并向其中加载了 50,000 个该类型的顶点。

当我尝试使用此 SQL 语句一次删除所有顶点时 -

DELETE VERTEX MESSAGE

我收到意外错误,指出某些顶点已被删除(但另一方面,我在加载后没有删除任何顶点),并且顶点不会按预期一次性删除所有顶点(见下文)。

orientdb> connect remote:localhost/databases/VehicleHistoryGraph admin admin

Connecting to database [remote:localhost/databases/VehicleHistoryGraph] with user 'admin'...OK
orientdb {db=VehicleHistoryGraph}> DELETE VERTEX MESSAGE

Error: com.orientechnologies.orient.core.exception.OCommandExecutionException: Error on execution of command: sql.select from Message

Error: java.lang.IllegalStateException: The elements #26:38028 has already been deleted

Error: com.orientechnologies.orient.core.exception.ORecordNotFoundException: The record with id '#26:38028' not found

Error: com.orientechnologies.orient.core.exception.ORecordNotFoundException: The record with id '#26:38028' not found

orientdb {db=VehicleHistoryGraph}> SELECT COUNT(@rid) FROM Message

----+------+-----
# |@CLASS|COUNT
----+------+-----
0 |null |13546
----+------+-----

1 item(s) found. Query executed in 1.538 sec(s).
orientdb {db=VehicleHistoryGraph}> DELETE VERTEX MESSAGE

Delete record(s) '11896' in 107.861000 sec(s).

orientdb {db=VehicleHistoryGraph}> SELECT COUNT(@rid) FROM Message

----+------+-----
# |@CLASS|COUNT
----+------+-----
0 |null |1820
----+------+-----

1 item(s) found. Query executed in 0.167 sec(s).

orientdb {db=VehicleHistoryGraph}> DELETE VERTEX MESSAGE

Delete record(s) '1820' in 6.320000 sec(s).

orientdb {db=VehicleHistoryGraph}>

出了什么问题?为什么?这是一个错误吗?

最佳答案

问题还存在吗?如果您尝试使用最新版本(从 2.2.x 开始),有 2 个有用的命令:

CHECK DATABASE (检查数据库的完整性。如果数据库包含图形,则检查其一致性)

REPAIR DATABASE (修复数据库)

关于OrientDB使用 "DELETE VERTEX ..."SQL语句时不会一次删除所有顶点,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32935411/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com