Hi,

I have a SPARQL query that took more than 25 sec to return with some results.

Our database size is 700 MB, with about 2 GB of free memory. Our data are 
stored in multiple graphs. The virtuoso.ini file was configured as follows:

NumberOfBuffers = 170000
MaxDirtyBuffers = 130000
MaxCheckpointRemap = 20000

However, the changes in the ini file didn't seem to improve the speed.

Is there a way to improve the performance by changing the index scheme? I saw 
the instructions but not sure about the best index setting for our particular 
query.

Please see below an example of our large query:


PREFIX core: <http://vivoweb.org/ontology/core#>

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

PREFIX bibo: <http://purl.org/ontology/bibo/>

PREFIX foaf: <http://xmlns.com/foaf/0.1/>


CONSTRUCT {

<http://mydomain.edu/individual/userid> 
<http://vivoweb.org/ontology/core#relatedBy> ?authorship .

?authorship a core:Authorship .

?authorship ?authorshipProperty ?authorshipValue .

?authorship core:relates ?infoResource .

?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .

?infoResource ?infoResourceProperty ?infoResourceValue .

?infoResource bibo:reproducedIn ?appearsInObj .

?infoResource core:publisher ?publisherObj .

?infoResource core:relatedBy ?editorship .

?editorship a core:Editorship .

?editorship core:relates ?editorObj .

?editorObj a foaf:Person .

?infoResource <http://purl.obolibrary.org/obo/BFO_0000050> ?partOfObj .

    ?appearsInObj rdfs:label ?appearsIn .

    ?publisherObj rdfs:label ?publisher .

    ?editorObj rdfs:label ?editor .

    ?partOfObj rdfs:label ?partOf

} WHERE {

    {

<http://mydomain.edu/individual/userid> 
<http://vivoweb.org/ontology/core#relatedBy> ?authorship .

   ?authorship a core:Authorship

}

UNION {

<http://mydomain.edu/individual/userid> 
<http://vivoweb.org/ontology/core#relatedBy> ?authorship .

   ?authorship a core:Authorship .

   ?authorship ?authorshipProperty ?authorshipValue

} UNION {

   <http://mydomain.edu/individual/userid> 
<http://vivoweb.org/ontology/core#relatedBy> ?authorship .

   ?authorship a core:Authorship .

   ?authorship core:relates ?infoResource .

   ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .

} UNION {

   <http://mydomain.edu/individual/userid> 
<http://vivoweb.org/ontology/core#relatedBy> ?authorship .

   ?authorship a core:Authorship .

   ?authorship core:relates ?infoResource .

   ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .

   ?infoResource ?infoResourceProperty ?infoResourceValue

} UNION {

   <http://mydomain.edu/individual/userid> 
<http://vivoweb.org/ontology/core#relatedBy> ?authorship .

   ?authorship a core:Authorship .

   ?authorship core:relates ?infoResource .

   ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .

   ?infoResource bibo:reproducedIn ?appearsInObj .

   ?appearsInObj rdfs:label ?appearsIn

} UNION {

   <http://mydomain.edu/individual/userid> 
<http://vivoweb.org/ontology/core#relatedBy> ?authorship .

   ?authorship a core:Authorship .

   ?authorship core:relates ?infoResource .

   ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .

   ?infoResource core:publisher ?publisherObj .

   ?publisherObj rdfs:label ?publisher

} UNION {

   <http://mydomain.edu/individual/userid> 
<http://vivoweb.org/ontology/core#relatedBy> ?authorship .

   ?authorship a core:Authorship .

   ?authorship core:relates ?infoResource .

   ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .

   ?infoResource core:relatedBy ?editorship .

   ?editorship a core:Editorship .

   ?editorship core:relates ?editorObj .

   ?editorObj a foaf:Person .

   ?editorObj rdfs:label ?editor

} UNION {

   <http://mydomain.edu/individual/userid> 
<http://vivoweb.org/ontology/core#relatedBy> ?authorship .

   ?authorship a core:Authorship .

   ?authorship core:relates ?infoResource .

   ?infoResource a <http://purl.obolibrary.org/obo/IAO_0000030> .

   ?infoResource <http://purl.obolibrary.org/obo/BFO_0000050> ?partOfObj .

       ?partOfObj rdfs:label ?partOf

    }

}

Unfortunately I cannot modify the query because it's part of the application. 
So I can only modify any possible settings in Virtuoso to improve the 
performance.

Any suggestion is greatly appreciated.

Thank you so much for your help.

Regards,
Eliza



------------------------------------------------------------------------------
_______________________________________________
Virtuoso-users mailing list
Virtuoso-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/virtuoso-users

Reply via email to