On 9/22/13 8:32 AM, Hugh Williams wrote:
a) select distinct ?g where {graph ?g {?s ?p ?o}}from the SPARQL endpoint and it timed out. however, the following query against http://www.geonames.org would work in a second: b) select count(*) as ?cc where {?s ?p ?o}
The issue is that listing all the named graph IRIs in a quad store is much different from getting a count of all the triples in a named graph.
Count of named graph IRIs would be: SELECT COUNT(*) WHERE {GRAPH ?g {?s ?p ?o}} . You can reduce the cost of this quest using: SELECT COUNT(*) WHERE {GRAPH ?g {?s a ?o}} . Examples using the LOD cloud cache instance:1. http://lod.openlinksw.com/sparql?default-graph-uri=&query=SELECT+COUNT%28*%29+WHERE+%7BGRAPH+%3Fg+%7B%3Fs+%3Fp+%3Fo%7D%7D+&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=30000&debug=on -- count of all named graphs associated with any triple
2. http://lod.openlinksw.com/sparql?default-graph-uri=&query=SELECT+COUNT%28*%29+WHERE+%7BGRAPH+%3Fg+%7B%3Fs+a+%3Fo%7D%7D+&format=text%2Fhtml&CXML_redir_for_subjs=121&CXML_redir_for_hrefs=&timeout=30000&debug=on -- count of all name graphs associate with isA relation based triples.
-- Regards, Kingsley Idehen Founder & CEO OpenLink Software Company Web: http://www.openlinksw.com Personal Weblog: http://www.openlinksw.com/blog/~kidehen Twitter/Identi.ca handle: @kidehen Google+ Profile: https://plus.google.com/112399767740508618350/about LinkedIn Profile: http://www.linkedin.com/in/kidehen
smime.p7s
Description: S/MIME Cryptographic Signature
------------------------------------------------------------------------------ LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/22/13. http://pubads.g.doubleclick.net/gampad/clk?id=64545871&iu=/4140/ostg.clktrk
_______________________________________________ Virtuoso-users mailing list Virtuoso-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/virtuoso-users