The issue is with the 
"SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }", which seems to be a very expensive operation. 

When you change the query to its more basic form:

SELECT ?item ?itemLabel
WHERE
{
   ?item wdt:P31 [] ;
         rdfs:label ?itemLabel .
   FILTER (lang(?itemLabel) = "en")
} LIMIT 10

the results seems to be in before you hit enter.

I am a big fan of the "SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }" due to is ease, but as said it is so expensive, that getting rid of it is one of the first things I do when a query times out.  

On Sun, Nov 25, 2018 at 3:11 PM Gerard Meijssen <gerard.meijssen@gmail.com> wrote:
At that, a Reasonator page fails to load eg https://tools.wmflabs.org/reasonator/?q=Q57328736&lang=en I have noticed that using tools like SourceMD will not always show the labels for items that were processed (less than 20)...

Performance is getting worse and particularly when you rely on up to date information, Wikidata is not what we were used to.
Thanks,
       GerardM

On Sun, 25 Nov 2018 at 14:56, Markus Kroetzsch <markus.kroetzsch@tu-dresden.de> wrote:
Hi,

I just noticed that BlazeGraph takes an undue amount of time for a
rather simple type of queries. The following times out:

SELECT ?item ?itemLabel
WHERE
{
   ?item wdt:P31 []
   SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
} LIMIT 10

Manually forcing a specific query plan makes the query work in <200ms:

SELECT ?item ?itemLabel
WHERE
{
   { SELECT * WHERE { ?item wdt:P31 [] } LIMIT 10 }
   SERVICE wikibase:label { bd:serviceParam wikibase:language "en". }
}

But of course the original query should normally be streaming and not
depend on any such smartness to push LIMIT inwards.

Cheers,

Markus


_______________________________________________
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata
_______________________________________________
Wikidata mailing list
Wikidata@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikidata