At least the last times I checked, the WikiData SPARQL server was extremely slow, frequently timing out.
The Wikidata folks are well aware of the limits on their SPARQL service. They just posted an update the other day:
https://lists.wikimedia.org/hyperkitty/list/wikidata@lists.w...