This query times out:
SELECT ?item ?label
WHERE
{
?item wdt:P31 ?instance ;
rdfs:label ?label ;
rdfs:label ?enLabel .
FILTER(CONTAINS(lcase(?label), "Soriano")).
FILTER(?instance != wd:Q5).
SERVICE wikibase:label {bd:serviceParam wikibase:language "en".}
}
LIMIT 100
I have this feeling that it's not actually using an index or even asking the right question and so is slow and times out?
How can I get my SPARQL query to be more performant or asking the right question?