[Building Sakai] SPARQL structure/time issue

Steve Swinsburg steve.swinsburg at gmail.com
Thu Apr 26 07:49:15 PDT 2012


Is this related to Sakai?

Sent from my iPhone

On 26/04/2012, at 23:55, "Cliff, David Graeme" <dgcliff at iu.edu> wrote:

> Never mind, I’ve managed to get decent return times by breaking up my queries. The below CONSTRUCT actually works quite well, it was my combined PI, CO-PI CONSTRUCT statement that made the server stumble around.
>  
> Cheers,
> David
>  
> From: Cliff, David Graeme 
> Sent: Thursday, April 26, 2012 9:45 AM
> To: 'sakai-dev at collab.sakaiproject.org'
> Subject: SPARQL structure/time issue
>  
> Hi all,
>  
> I get the sneaking suspicion that the SPARQL I’m running could be better structured, as it takes a long time to return, and was wondering if anyone had any ideas how I might reorganize it.
>  
> SELECT  (COUNT(DISTINCT ?pirole) AS ?count)
> WHERE
> {
>                 ?pirole a <http://vivoweb.org/ontology/core#PrincipalInvestigatorRole> ;
>                                 ?a ?b .
>                 NOT EXISTS {?pirole <http://vivoweb.org/ontology/core#principalInvestigatorRoleOf> ?x}
> }
>  
> That query takes almost 10 minutes to return, and the result is 22529. If I drop the ?a ?b (obviously not needed for a count) it comes back in reasonable time. However that’s not really an option for the CONSTRUCT query I run, and its this that the server has a very hard time dealing with.
>  
> CONSTRUCT
> {
>                 ?pirole ?a ?b .
> }
> WHERE
> {
>                 ?pirole a <http://vivoweb.org/ontology/core#PrincipalInvestigatorRole> ;
>                                 ?a ?b .
>                 NOT EXISTS {?pirole <http://vivoweb.org/ontology/core#principalInvestigatorRoleOf> ?x}
> }
>  
> Any ideas?
>  
> - David
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
> 
> TO UNSUBSCRIBE: send email to sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of "unsubscribe"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120427/954aebec/attachment.html 


More information about the sakai-dev mailing list