query-2416888bd5de31c4723dd4c46d4ddecb
Will -main be faster ]reply[14:05, 4 September 2024 (UTC)) talk (VicarageIf I switch to -main, will it be faster, both by design and because of fewer requests? Happy to be a guinea pig! ]reply[18:33, 4 September 2024 (UTC)) talk (GLederrey (WMF) -main might be marginally faster, both because it is likely to have less requests (at least until everyone migrates to it) and less data. Response times are not what we are trying to optimising for, I suspect that performance improvements are going to be marginal. Also, we're going to move servers around once -main starts getting more traffic, so that load on the various servers equalize. We will keep an eye on performance, but since the query load will be different on each endpoint, comparison are not going to be easy. Thanks a lot for being a willing guinea pig! That is most helpful! Note that those endpoints are brand new, we might find a few bumps on the way. Please let us know if anything does not work as expected.times in seconds for a series of related runs old 13.37 18.74 7.17 61.01 105.88 -main 8.21 8.23 5.35 35.92 33.13 But -main returns 9591 items when the original returns 9608 in one area. Do you expect the results to be different? ]reply[13:13, 5 September 2024 (UTC)) talk (GLederrey (WMF) It all depends on the query. If the query does not depend on the scholarly graph, the results should be identical on the full or main graph. Could you share the query you are using in your tests?No scholarly stuff in this, but I'm afraid I can't do more debugging, as I'm off on holiday.
Use at
- https://query.wikidata.org/sparql
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX wikibase: <http://wikiba.se/ontology#>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX schema: <http://schema.org/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX bd: <http://www.bigdata.com/rdf#>
SELECT DISTINCT ?label ?item ?itemDescription ?extra ?modified WHERE {
SERVICE wikibase:label { bd:serviceParam wikibase:language "en-GB,en,mul,fr,de,es,pt,pl,nl,cs". }
{ SELECT DISTINCT ?item (GROUP_CONCAT(DISTINCT ?extralist; SEPARATOR = "#") AS ?extra)
(GROUP_CONCAT(DISTINCT ?officialnamelist; SEPARATOR = " / ") AS ?officialname) ?item_label ?modified WHERE {
SELECT DISTINCT ?item ?extralist ?officialnamelist ?item_label ?modified WHERE {
?item wdt:P31/wdt:P279* wd:Q177597. # naval vessel
MINUS {
{?item wdt:P31 wd:Q575727} # museum ship
UNION
{?item wdt:P366 wd:Q575727}
}
?item wdt:P137 ?navy. ?navy wdt:P17 wd:Q30.
?item schema:dateModified ?modified .
FILTER(BOUND(?modified) && DATATYPE(?modified) = xsd:dateTime).
OPTIONAL {?item wdt:P1448 ?officialnamelist. FILTER (LANG(?officialnamelist) = "mul")}
?item rdfs:label ?item_label. FILTER (LANG(?item_label) = "en")
OPTIONAL {
{?item wdt:P31 ?extra} # instance
UNION {?item wdt:P279 ?extra} # subclass
UNION {?item wdt:P17 ?extra} # country
UNION {?item wdt:P27 ?extra} # country of citizenship
UNION {?item wdt:P495 ?extra} # country of origin
UNION {?item wdt:P710 ?extra} # participant
UNION {?item wdt:P137 ?operator. ?operator wdt:P17 ?extra} # operator
?extra rdfs:label ?extralist. FILTER (LANG(?extralist) = "en")
}
}
ORDER BY ASC(?item_label) ASC(?extralist)
}
GROUP BY ?item ?item_label ?modified
ORDER BY ASC(?item_label)
}
BIND(IF(?officialname = "",?item_label,?officialname) AS ?label)
}