plazi / taxomplete

Allows auto-completion of species in an input field
0 stars 0 forks source link

Performance SPARQL Queries #7

Open retog opened 4 years ago

retog commented 4 years ago

Investigate long query response time

retog commented 4 years ago

query 1:

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dwc: <http://rs.tdwg.org/dwc/terms/>
PREFIX dwcfp: <http://filteredpush.org/ontologies/oa/dwcFP#>
PREFIX tp: <https://vocab.plazi.org/taxomplete/>
SELECT DISTINCT ?genus ?species WHERE {
  ?sub dwc:genus ?genus .
  ?sub dwc:species ?species .
  ?sub rdf:type dwcfp:TaxonName.
  ?sub tp:speciesPrefix4 "sada".
  FILTER REGEX(?species, "^Sada","i")
} ORDER BY UCASE(?species) LIMIT 10

query 1.1

PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dwc: <http://rs.tdwg.org/dwc/terms/>
PREFIX dwcfp: <http://filteredpush.org/ontologies/oa/dwcFP#>
PREFIX tp: <https://vocab.plazi.org/taxomplete/>
SELECT DISTINCT ?genus ?species WHERE {
  ?sub dwc:genus ?genus .
  ?sub dwc:species ?species .
  ?sub rdf:type dwcfp:TaxonName.
  FILTER REGEX(?species, "^Sada","i")
} ORDER BY UCASE(?species) LIMIT 10
retog commented 4 years ago

Query 1:

Query 1.1

retog commented 4 years ago

Allegro after optimizing repository:

Query 1.1: ~1.5s

retog commented 4 years ago

day after (after update)

retog commented 4 years ago

25 days later after optimization