Hi Alexander You can turn transactions off and then back on using the log_enable() function directly as:
log_enable(3,1); SPARQL CLEAR GRAPH <graph-name>; or as a pragma in the specified query as: SPARQL DEFINE sql:log-enable 3 CLEAR GRAPH <graph-name>; or you can even deleted the triples directly from the RDF_QUAD table with : log_enable(3,1); delete from rdf_quad where g = iri_to_id (‘graph-name’); Let me know if this works for you ... Best Regards Hugh Williams Professional Services OpenLink Software Web: http://www.openlinksw.com Support: http://support.openlinksw.com Forums: http://boards.openlinksw.com/support Twitter: http://twitter.com/OpenLink On 10 Jun 2011, at 21:16, Alexander Sidorov wrote: > Hi Hugh, > > I forgot about that discussion and it really looks like the same problem. > Unfortunately I have no idea how to execute "define sql:log-enable NNN" > before the query - it doesn't run. > > Virtuoso 06.01.3127 > > About 30kk of triples. > > I am pretty sure my query calculates triples count inside a graph. > > Regards, > Alexander > > 2011/6/9 Hugh Williams <hwilli...@openlinksw.com> > Hi Alexander, > > Its been a while, but one of the last conversation we had about a year was > with regards to clear graph issues you were having in which Ivan had > suggested: > > >>> > Try "define sql:log-enable NNN" at the beginning of CLEAR GRAPH > statement. That will invoke log_enable (NNN, 1) before the operation > (and restore the log mode back to original value after the operation). > The log_enable() BIF is described in > http://docs.openlinksw.com/virtuoso/fn_log_enable.html > >>> > > Is this still the same or similar issue ? > > What version of Virtuoso are you running currently (virtuoso-t -?) ? > > What is the size in triple count of the graph(s) being clear’ed ? > > In your query below you are counting the number of graphs, but clear graph > does not remove a graph it just clears its content so the graph count will > remain the same, but the key is has the over all triple count reduced ( ie > select count(*) where {?s ?p ?o}) ? If the graphs where explicitly created > then you can use “drop graph <graph-name>” instead to remove it, although > even that needs some explaining in terms of the differences between create, > drop, clear and delete Graph as detailed at: > > > http://virtuoso.openlinksw.com/dataspace/dav/wiki/Main/VirtTipsAndTricksGuideCreateGraph > > The database size will not reduce when you remove content as once pages are > allocated they are not returned. If running v6 you can try running the > vacuum() function which will perform some compact of the database as detailed > at: > > http://docs.openlinksw.com/virtuoso/fn_vacuum.html > > Best Regards > Hugh Williams > Professional Services > OpenLink Software > Web: http://www.openlinksw.com > Support: http://support.openlinksw.com > Forums: http://boards.openlinksw.com/support > Twitter: http://twitter.com/OpenLink > > On 9 Jun 2011, at 16:39, Alexander Sidorov wrote: > > > Hello! > > > > I need to clear some graph from Virtuoso database. I execute "sparql clear > > graph <graphName" from isql, virtuoso-t takes all my free memory but the > > size of database file doesn't become better and even "select count(*) from > > graph <graphName> { ?s ?p ?o}" doesn't become less. What am I doind wrong? > > > > Regard, > > Alexander > > ------------------------------------------------------------------------------ > > EditLive Enterprise is the world's most technically advanced content > > authoring tool. Experience the power of Track Changes, Inline Image > > Editing and ensure content is compliant with Accessibility Checking. > > http://p.sf.net/sfu/ephox-dev2dev_______________________________________________ > > Virtuoso-users mailing list > > Virtuoso-users@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/virtuoso-users > > > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev_______________________________________________ > Virtuoso-users mailing list > Virtuoso-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/virtuoso-users