I’ll try it! Thanks.

 

 

- Steve

 

Steven R. Ray, Ph.D.

Distinguished Research Fellow

Carnegie Mellon University

NASA Research Park

Building 23 (MS 23-11)

P.O. Box 1
Moffett Field, CA 94305-0001

Email:    [email protected]

Phone: (650) 587-3780

Cell:      (202) 316-6481

Skype: steverayconsulting

cid:[email protected]

 

From: [email protected] [mailto:[email protected]] 
On Behalf Of Richard Cyganiak
Sent: Friday, August 31, 2018 9:29 AM
To: [email protected]
Subject: Re: [topbraid-users] Trying to improve performance

 

Not much that can be done just by changing the query I think.

 

If you can modify the dataset, then one approach would be to precompute the 
results of the afn:namespace call. So, add an additional triple of this form to 
each subject in the dataset:

 

    <http://mynamespace#foo> my:namespace "http://mynamespace# 
<http://mynamespace> " .

 

Then you can query for

 

    GRAPH <http://mygraph> {

        ?s my:namespace "http://mynamespace# <http://mynamespace> " .

        ?s ?p ?o .

    }

 

and that should be much faster.

 

Richard

 

 

 

On 31 Aug 2018, at 17:13, Steve Ray (CMU) <[email protected]> wrote:

 

Hi,

            I’m putting out this request to the community at large to see if 
there are ideas that I’m unaware of. I have a fairly large database of roughly 
1.5 million triples. It is populated with many sets of roughly 450 triples 
which share the same namespace. Many of my operations involve retrieving one of 
those sets of triples, but I’m finding it takes about 7 seconds to execute on 
TBL, installed on a 16GB AWS instance. Here is the SPARQL query I’m using to 
get a set of triples:

 

 

PREFIX afn: < <http://jena.hpl.hp.com/ARQ/function> 
http://jena.hpl.hp.com/ARQ/function#>

SELECT ?s ?p ?o

WHERE {

GRAPH < <http://mygraph/> http://mygraph> {

    ?s ?p ?o .

    FILTER (afn:namespace(?s) = " <http://mynamespace/> http://mynamespace#";) .

}}

 

 

Is there some clever way to pull just the triples in a single namespace that 
doesn’t involve using ?s ?p ?o followed by a FILTER?

Brilliant ideas welcome!

 

 

- Steve

 

Steven R. Ray, Ph.D.

Distinguished Research Fellow

Carnegie Mellon University

NASA Research Park

Building 23 (MS 23-11)

P.O. Box 1
Moffett Field, CA 94305-0001

Email:     <mailto:[email protected]> [email protected]

Phone: (650) 587-3780

Cell:      (202) 316-6481

Skype: steverayconsulting

<image001.png>

 

 

-- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to  <mailto:[email protected]> 
[email protected].
For more options, visit  <https://groups.google.com/d/optout> 
https://groups.google.com/d/optout.

 

 


 
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
 

Virus-free.  
<http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient>
 www.avg.com 

-- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to