I've been using the following SPARQL query to find the graphs in a triple-store:
select distinct ?g where { graph ?g {?s ?p ?o} }
This seems inefficient.
Is there a better way?
I've been using the following SPARQL query to find the graphs in a triple-store:
select distinct ?g where { graph ?g {?s ?p ?o} }
This seems inefficient.
Is there a better way?
The form:
SELECT * { GRAPH ?g {} }
will give you all the graph names, no duplicates.