我正在使用 Virtuoso .它安装在服务器机器上。我正试图从我的 Virtuoso 中删除一个大的 RDF 图。它包含 2,590,994,053 个三元组。我试图使用以下命令删除图表。
SPARQL DROP SILENT GRAPH <http://ndssl.bi.vt.edu/chicago/>
但是运行了很长时间后,Virtuoso 给我以下错误。
*** Error 08S01: [Virtuoso Driver]CL065: Lost connection to server at line 6 of Top-Level:SPARQL DROP SILENT GRAPH <http://ndssl.bi.vt.edu/chicago/>
这个删除命令也在我的 Virtuoso 服务器上。我也尝试使用 SPARQL CLEAR
命令。跑了很久,也终止了。
顺便说一句,我已将内存大小增加到 128 GB 并设置了以下配置值。但是,它不起作用。
NumberOfBuffers = 10900000
MaxDirtyBuffers = 8000000
MaxCheckpointRemap = 650000000
请告诉我如何从我的 Virtuoso 三重存储中删除这个大图。我在 Virtuoso 中还有一些其他图表。我不想删除它们。
最佳答案
如 How can I delete graphs containing large numbers of triples from the Virtuoso Quad Store? 中所述--
By default, triple deletion is performed as part of a transaction, which is stored in memory until the operation is completed and committed to the database. During typical server operation, deleting one or more graphs containing large numbers of triples (generally millions or more) can consume available memory to the point where the operation cannot be completed, and thus the graph(s) cannot be deleted.
Such large graphs can be cleared by changing the transaction log mode to
autocommit
before deleting the graph(s) or triples. This is easily done using the Virtuosolog_enable()
function, with the settingslog_enable(3,1)
.This function may be called on its own, prior to the delete operation, via iSQL (either command-line or the Conductor variant), as shown:
SQL> log_enable(3,1);
SQL> SPARQL CLEAR GRAPH <graph-name>;
log_enable()
may also be called as a pragma specified in a SPARQL/Update query (note: this query is written for execution through the SPARQL interface; if executed through an SQL interface, you must prepend theSPARQL
keyword):
DEFINE sql:log-enable 3
CLEAR GRAPH <graph-name>
Triples can also be deleted directly from the
RDF_QUAD
table via SQL, but note that this method will not remove any free-text index data that might be associated with the graph, whichCLEAR GRAPH ...
would do automatically. The SQL operation would look something like this:
SQL> log_enable(3,1);
SQL> DELETE FROM rdf_quad WHERE g = iri_to_id ('http://mygraph.org');
关于sparql - Virtuoso 大型 RDF 图去除难度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37512969/