Hi Stas,
On 21-04-2017 15:04, Stas Malyshev wrote:
Hi!
You agree with me that this query : `select distinct ?g { graph ?g {?s ?p ?o} }` seems to be a valid SPARQL query, but throws an error in WDQS service [1].
It is a valid SPARQL query, but what you're essentially asking is to download whole 1.8b triples in a single query. There's no way we can deliver this in one minute, which is current constraint on queries, neither we want to enable queries like this - they are very resource-intensive and serve little purpose.
If you want to work with huge data sets or import the whole data, you may look either into getting the dump download and processing it with offline tools like Wikidata Toolkit[2], or using our LDF server[1] which is lightweight and allows you to work with the data much more efficiently.
While not having a strong opinion on the question of whether or not WDQS should support graph queries if it doesn't have named graphs, I disagree on the minor technical point that that query requires streaming all data. It simply asks for a unique list of all named graphs. Typically that will be much smaller than the entire data.
(Of course a naive implementation might stream everything to compute the query, but that's another matter I think.)
Cheers, Aidan