You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jena.apache.org by Abduladem Eljamel <a_...@yahoo.co.uk> on 2015/03/14 02:43:59 UTC
TDB Optimization
Hi All
I loaded DBPedia RDF dump File to JenaTDB store. The triples were loaded successively including the indexingphase and “stats,opt” file was created; however, the SPARQL queries are notworking for complex queries. It takes very long time (and non-stop runningsometimes). I ran “tdbstats” command to optimize TDB but there was no change tothe query running or to “stats.opt”. The “tdbstats” command does not create anyOptimizer control file.After I removed the “stats.opt” fileand ran the query, I got a result even after a very long time. I tried those opertions in two kind of computers. The first is with Windows7-x64,Intel i7 4 cores, 32GB RAM. 2TB HD. The second is with OS X 10.10.2, Intel i7,16GB RAM, 1TB HD.**************************************************************
The query that I am using to test is:*******************************************************************
PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>PREFIX dbpo: <http://dbpedia.org/ontology/>PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>SELECT DISTINCT ?lblWHERE { { ?entity1 ?rel ?entity2 } UNION { ?entity2 ?rel ?entity1 } ?entity1 rdf:type dbpo:Person . ?entity2 rdf:type dbpo:Place . ?rel rdfs:label ?lbl FILTER ( lang(?lbl) = "en" )} ********************************************************************
the JAVA code to run query is:************************************************************************
Location location = new Location("C:/myFiles/RDF-DBPedia/TDB-DP") ;
Dataset dataset = TDBFactory.createDataset(location);
dataset.begin(ReadWrite.READ) ;
try{
QueryExecution ex = QueryExecutionFactory.create(query, dataset);
ResultSet res = ex.execSelect() ;
ResultSetFormatter.out(res) ;
} finally {
dataset.end() ;
}
******************************************************************
The total time taken in Windows was: 20 minutes 34seconds.The total time taken in MAC was: 26 minutes 58seconds.The total time taken in online DBPedia endpoint was seconds.My question is: what kind of instructions or stepsI miss to get query results in a local TDB storage faster?
Thanks in advanceAbdul
Re: TDB Optimization
Posted by Andy Seaborne <an...@apache.org>.
> 2.11.0
Probably a good idea to upgrade to 2.13.0. The on-disk data does not
have to be reloaded.
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
>
> SELECT DISTINCT (str(?lbl) AS ?relLBL)
> WHERE
> { { ?entity1 ?rel ?entity2 }
> UNION
> { ?entity2 ?rel ?entity1 }
> ?entity1 rdfs:label "Tennessee"@en .
> ?entity2 rdfs:label "Jack Daniel"@en .
> ?rel rdfs:label ?lbl
> FILTER ( lang(?lbl) = "en" )
> }
This is a very different query to last time which had
?entity1 rdf:type dbpo:Person
?entity2 rdf:type dbpo:Place
This new query is best done something like:
SELECT DISTINCT (str(?lbl) AS ?relLBL)
WHERE
{
?entity2 rdfs:label "Jack Daniel"@en .
?entity1 rdfs:label "Tennessee"@en .
{ ?entity1 ?rel ?entity2 }
UNION
{ ?entity2 ?rel ?entity1 }
?rel rdfs:label ?lbl
FILTER ( lang(?lbl) = "en" )
}
and remove the DISTINCT while developing as repeats help you know if the
query is doing what you expect.
> | relLBL |
> | birth place |
> | PLACE OF BIRTH |
> | death place |
Is that a column, headed "relLBL" and three rows?
Start simple:
SELECT { ?entity2 rdfs:label "Jack Daniel"@en . }
how many?
SELECT { ?entity1 rdfs:label "Tennessee"@en . }
how many?
Then multiply together to get the number of things that the UNION will try.
> Because Freebase endpoint does not support SPARQL query language, I
> have thought that loading its RDF dump file to TDB store and using
> SPARQL language to extract relations between entities is a solution to
> my reserach. DBPedia contains triples less than half Trillion and makes
> TDB very slow so what is about 2.6 Trillion triples in Freebase, could
> TDB handle it?
Freebase claims to be 1.9 billion, not a 2.6 trillion, which is 1000x
larger.
TDB will only acceptable if your queries are very specific ("look up a
key,get a few values" will you get anything like tolerable response. If
you do pattern-searching, then TDB at billions isn't going to work.
This second query is rather more specific (I'd guess not many "Jack
Daniel"@en -- but many rdf:type dbpo:Person or rdf:type dbpo:Place).
Andy
On 15/03/15 13:30, Abduladem Eljamel wrote:
> Hi Andy,,
> Thank you for answering my email.
> The Jena version is (2.11.0) included TDB version (1.0.0).
> I am using the last DBPedia dump file of size around (64GB).
> I used “TDBloader2” to load this dump file to TDB store.
> It loaded (410345971 triples) to TDB store.
> The total size of TDB files is around (60GB).
>
> I tried all queries you offered, but there is no effect, very long time or no end running. I tried them by using both, local Fuseki server and Jena API in Java application. However, when I tried the same queries by using DBpedia online endpoints, it took seconds (including the query I wrote).
>
> I am using DBPedia to find what kind of relations between two entities in online news text (ex. Person, Organisation and Location).
> This is an example of query that I am using in my application by using DBPedia online endpoint that works fine and very fast. It extracts the relations in a dataset between "Tennessee" location and "Jack Daniel" person.
> *******************************************************************************
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
>
> SELECT DISTINCT (str(?lbl) AS ?relLBL)
> WHERE
> { { ?entity1 ?rel ?entity2 }
> UNION
> { ?entity2 ?rel ?entity1 }
> ?entity1 rdfs:label "Tennessee"@en .
> ?entity2 rdfs:label "Jack Daniel"@en .
> ?rel rdfs:label ?lbl
> FILTER ( lang(?lbl) = "en" )
> }
> the answer of this query by using DBPedia online endpoint is:
> | relLBL |
> | birth place |
> | PLACE OF BIRTH |
> | death place |
>
> ****************************************************************************************
>
> I am a PhD student and my reserach is in a critical point because I am tending to use a bigger dataset, Freebase dataset, to extract relations. Because Freebase endpoint does not support SPARQL query language, I have thought that loading its RDF dump file to TDB store and using SPARQL language to extract relations between entities is a solution to my reserach. DBPedia contains triples less than half Trillion and makes TDB very slow so what is about 2.6 Trillion triples in Freebase, could TDB handle it?
> I read many papers which compare between RDF stores in terms of BigData era. I found that Jena TDB is good enough for my data besides that I have a satisfactory Jena background.
>
> How to make Jena TDB fast enough to extract relation from Freebase?
> I am sorry for this long email, but as I said above, my research is in critical point and I need every little help.Thanks in advance.Abdul
>
>
> From: Andy Seaborne <an...@apache.org>
> To: users@jena.apache.org
> Sent: Saturday, 14 March 2015, 19:09
> Subject: Re: TDB Optimization
>
> One other point:
>
> TDB query execution does not, currently, use multiple threads for a
> single query. In Fuseki, where multiple overlapping requests matter,
> the cores allow the server to execute requests in true concurrency.
>
>
>
> Andy
>
>
>
>
>
Re: TDB Optimization
Posted by Rob Vesse <rv...@dotnetrdf.org>.
The biggest single thing you can and should do is to upgrade to Jena
2.13.0 as Andy already suggested
2.11.0 is from Sep 2013 I.e. 18 months ago, there have been 5 releases of
Jena (and thus TDB) since then many of which have included substantial
improvements to the query optimiser
Rob
On 15/03/2015 13:30, "Abduladem Eljamel" <a_...@yahoo.co.uk> wrote:
>Hi Andy,,
>Thank you for answering my email.
>The Jena version is (2.11.0) included TDB version (1.0.0).
>I am using the last DBPedia dump file of size around (64GB).
>I used “TDBloader2” to load this dump file to TDB store.
>It loaded (410345971 triples) to TDB store.
>The total size of TDB files is around (60GB).
>
>I tried all queries you offered, but there is no effect, very long time
>or no end running. I tried them by using both, local Fuseki server and
>Jena API in Java application. However, when I tried the same queries by
>using DBpedia online endpoints, it took seconds (including the query I
>wrote).
>
>I am using DBPedia to find what kind of relations between two entities in
>online news text (ex. Person, Organisation and Location).
>This is an example of query that I am using in my application by using
>DBPedia online endpoint that works fine and very fast. It extracts the
>relations in a dataset between "Tennessee" location and "Jack Daniel"
>person.
>**************************************************************************
>*****
>PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
>
>SELECT DISTINCT (str(?lbl) AS ?relLBL)
>WHERE
> { { ?entity1 ?rel ?entity2 }
> UNION
> { ?entity2 ?rel ?entity1 }
> ?entity1 rdfs:label "Tennessee"@en .
> ?entity2 rdfs:label "Jack Daniel"@en .
> ?rel rdfs:label ?lbl
> FILTER ( lang(?lbl) = "en" )
> }
>the answer of this query by using DBPedia online endpoint is:
>| relLBL |
>| birth place |
>| PLACE OF BIRTH |
>| death place |
>
>**************************************************************************
>**************
>
>I am a PhD student and my reserach is in a critical point because I am
>tending to use a bigger dataset, Freebase dataset, to extract relations.
>Because Freebase endpoint does not support SPARQL query language, I have
>thought that loading its RDF dump file to TDB store and using SPARQL
>language to extract relations between entities is a solution to my
>reserach. DBPedia contains triples less than half Trillion and makes TDB
>very slow so what is about 2.6 Trillion triples in Freebase, could TDB
>handle it?
>I read many papers which compare between RDF stores in terms of BigData
>era. I found that Jena TDB is good enough for my data besides that I have
>a satisfactory Jena background.
>
>How to make Jena TDB fast enough to extract relation from Freebase?
>I am sorry for this long email, but as I said above, my research is in
>critical point and I need every little help.Thanks in advance.Abdul
>
>
> From: Andy Seaborne <an...@apache.org>
> To: users@jena.apache.org
> Sent: Saturday, 14 March 2015, 19:09
> Subject: Re: TDB Optimization
>
>One other point:
>
>TDB query execution does not, currently, use multiple threads for a
>single query. In Fuseki, where multiple overlapping requests matter,
>the cores allow the server to execute requests in true concurrency.
>
>
>
> Andy
>
>
>
Re: TDB Optimization
Posted by Arthur Ryman <ar...@gmail.com>.
Abduladem,
To optimize performance in TDB, put the most restrictive pattern
first. I assume that there are fewer facts about "Jack Daniel" than
about "Tennessee". Try the following order:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT (str(?lbl) AS ?relLBL)
WHERE
{
?entity2 rdfs:label "Jack Daniel"@en .
{{ ?entity1 ?rel ?entity2 }
UNION
{ ?entity2 ?rel ?entity1 }}
?rel rdfs:label ?lbl
FILTER ( lang(?lbl) = "en" )
?entity1 rdfs:label "Tennessee"@en .
}
-- Arthur
On Sun, Mar 15, 2015 at 9:30 AM, Abduladem Eljamel
<a_...@yahoo.co.uk> wrote:
> Hi Andy,,
> Thank you for answering my email.
> The Jena version is (2.11.0) included TDB version (1.0.0).
> I am using the last DBPedia dump file of size around (64GB).
> I used “TDBloader2” to load this dump file to TDB store.
> It loaded (410345971 triples) to TDB store.
> The total size of TDB files is around (60GB).
>
> I tried all queries you offered, but there is no effect, very long time or no end running. I tried them by using both, local Fuseki server and Jena API in Java application. However, when I tried the same queries by using DBpedia online endpoints, it took seconds (including the query I wrote).
>
> I am using DBPedia to find what kind of relations between two entities in online news text (ex. Person, Organisation and Location).
> This is an example of query that I am using in my application by using DBPedia online endpoint that works fine and very fast. It extracts the relations in a dataset between "Tennessee" location and "Jack Daniel" person.
> *******************************************************************************
> PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
>
> SELECT DISTINCT (str(?lbl) AS ?relLBL)
> WHERE
> { { ?entity1 ?rel ?entity2 }
> UNION
> { ?entity2 ?rel ?entity1 }
> ?entity1 rdfs:label "Tennessee"@en .
> ?entity2 rdfs:label "Jack Daniel"@en .
> ?rel rdfs:label ?lbl
> FILTER ( lang(?lbl) = "en" )
> }
> the answer of this query by using DBPedia online endpoint is:
> | relLBL |
> | birth place |
> | PLACE OF BIRTH |
> | death place |
>
> ****************************************************************************************
>
> I am a PhD student and my reserach is in a critical point because I am tending to use a bigger dataset, Freebase dataset, to extract relations. Because Freebase endpoint does not support SPARQL query language, I have thought that loading its RDF dump file to TDB store and using SPARQL language to extract relations between entities is a solution to my reserach. DBPedia contains triples less than half Trillion and makes TDB very slow so what is about 2.6 Trillion triples in Freebase, could TDB handle it?
> I read many papers which compare between RDF stores in terms of BigData era. I found that Jena TDB is good enough for my data besides that I have a satisfactory Jena background.
>
> How to make Jena TDB fast enough to extract relation from Freebase?
> I am sorry for this long email, but as I said above, my research is in critical point and I need every little help.Thanks in advance.Abdul
>
>
> From: Andy Seaborne <an...@apache.org>
> To: users@jena.apache.org
> Sent: Saturday, 14 March 2015, 19:09
> Subject: Re: TDB Optimization
>
> One other point:
>
> TDB query execution does not, currently, use multiple threads for a
> single query. In Fuseki, where multiple overlapping requests matter,
> the cores allow the server to execute requests in true concurrency.
>
>
>
> Andy
>
>
>
>
Re: TDB Optimization
Posted by Abduladem Eljamel <a_...@yahoo.co.uk>.
Hi Andy,,
Thank you for answering my email.
The Jena version is (2.11.0) included TDB version (1.0.0).
I am using the last DBPedia dump file of size around (64GB).
I used “TDBloader2” to load this dump file to TDB store.
It loaded (410345971 triples) to TDB store.
The total size of TDB files is around (60GB).
I tried all queries you offered, but there is no effect, very long time or no end running. I tried them by using both, local Fuseki server and Jena API in Java application. However, when I tried the same queries by using DBpedia online endpoints, it took seconds (including the query I wrote).
I am using DBPedia to find what kind of relations between two entities in online news text (ex. Person, Organisation and Location).
This is an example of query that I am using in my application by using DBPedia online endpoint that works fine and very fast. It extracts the relations in a dataset between "Tennessee" location and "Jack Daniel" person.
*******************************************************************************
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
SELECT DISTINCT (str(?lbl) AS ?relLBL)
WHERE
{ { ?entity1 ?rel ?entity2 }
UNION
{ ?entity2 ?rel ?entity1 }
?entity1 rdfs:label "Tennessee"@en .
?entity2 rdfs:label "Jack Daniel"@en .
?rel rdfs:label ?lbl
FILTER ( lang(?lbl) = "en" )
}
the answer of this query by using DBPedia online endpoint is:
| relLBL |
| birth place |
| PLACE OF BIRTH |
| death place |
****************************************************************************************
I am a PhD student and my reserach is in a critical point because I am tending to use a bigger dataset, Freebase dataset, to extract relations. Because Freebase endpoint does not support SPARQL query language, I have thought that loading its RDF dump file to TDB store and using SPARQL language to extract relations between entities is a solution to my reserach. DBPedia contains triples less than half Trillion and makes TDB very slow so what is about 2.6 Trillion triples in Freebase, could TDB handle it?
I read many papers which compare between RDF stores in terms of BigData era. I found that Jena TDB is good enough for my data besides that I have a satisfactory Jena background.
How to make Jena TDB fast enough to extract relation from Freebase?
I am sorry for this long email, but as I said above, my research is in critical point and I need every little help.Thanks in advance.Abdul
From: Andy Seaborne <an...@apache.org>
To: users@jena.apache.org
Sent: Saturday, 14 March 2015, 19:09
Subject: Re: TDB Optimization
One other point:
TDB query execution does not, currently, use multiple threads for a
single query. In Fuseki, where multiple overlapping requests matter,
the cores allow the server to execute requests in true concurrency.
Andy
Re: TDB Optimization
Posted by Andy Seaborne <an...@apache.org>.
One other point:
TDB query execution does not, currently, use multiple threads for a
single query. In Fuseki, where multiple overlapping requests matter,
the cores allow the server to execute requests in true concurrency.
Andy
Re: TDB Optimization
Posted by Andy Seaborne <an...@apache.org>.
On 14/03/15 01:43, Abduladem Eljamel wrote:
> Hi All
>
> I loaded DBPedia RDF dump File to JenaTDB store. The triples were loaded successively including the indexingphase and “stats,opt” file was created; however, the SPARQL queries are notworking for complex queries. It takes very long time (and non-stop runningsometimes). I ran “tdbstats” command to optimize TDB but there was no change tothe query running or to “stats.opt”. The “tdbstats” command does not create anyOptimizer control file.After I removed the “stats.opt” fileand ran the query, I got a result even after a very long time. I tried those opertions in two kind of computers. The first is with Windows7-x64,Intel i7 4 cores, 32GB RAM. 2TB HD. The second is with OS X 10.10.2, Intel i7,16GB RAM, 1TB HD.**************************************************************
> The query that I am using to test is:*******************************************************************
> PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>PREFIX dbpo: <http://dbpedia.org/ontology/>PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>SELECT DISTINCT ?lblWHERE { { ?entity1 ?rel ?entity2 } UNION { ?entity2 ?rel ?entity1 } ?entity1 rdf:type dbpo:Person . ?entity2 rdf:type dbpo:Place . ?rel rdfs:label ?lbl FILTER ( lang(?lbl) = "en" )} ********************************************************************
> the JAVA code to run query is:************************************************************************
> Location location = new Location("C:/myFiles/RDF-DBPedia/TDB-DP") ;
> Dataset dataset = TDBFactory.createDataset(location);
> dataset.begin(ReadWrite.READ) ;
> try{
> QueryExecution ex = QueryExecutionFactory.create(query, dataset);
> ResultSet res = ex.execSelect() ;
> ResultSetFormatter.out(res) ;
> } finally {
> dataset.end() ;
> }
> ******************************************************************
>
> The total time taken in Windows was: 20 minutes 34seconds.The total time taken in MAC was: 26 minutes 58seconds.The total time taken in online DBPedia endpoint was seconds.My question is: what kind of instructions or stepsI miss to get query results in a local TDB storage faster?
> Thanks in advanceAbdul
Hi there,
Which version of Jena TDB are you using?
How big is the database? (in triples and in bytes)?
I tried all the illustrations below with Jena 2.13.0 which includes some
changes in the area.
Reformatting:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dbpo: <http://dbpedia.org/ontology/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
SELECT DISTINCT ?lbl
WHERE
{ { ?entity1 ?rel ?entity2 }
UNION
{ ?entity2 ?rel ?entity1 }
?entity1 rdf:type dbpo:Person .
?entity2 rdf:type dbpo:Place .
?rel rdfs:label ?lbl
FILTER ( lang(?lbl) = "en" )
}
which is the SPARQL algebra:
http://www.sparql.org/query-validator.html
(prefix ((rdfs: <http://www.w3.org/2000/01/rdf-schema#>)
(dbpo: <http://dbpedia.org/ontology/>)
(rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>))
(distinct
(project (?lbl)
(filter (= (lang ?lbl) "en")
(join
(union
(bgp (triple ?entity1 ?rel ?entity2))
(bgp (triple ?entity2 ?rel ?entity1)))
(bgp
(triple ?entity1 rdf:type dbpo:Person)
(triple ?entity2 rdf:type dbpo:Place)
(triple ?rel rdfs:label ?lbl)
))))))
The ARQ/TDB optimizer isn't powerful enough to do some of the reordering
possible on this query. It does leave things alone where it is not
optimizing so rewriting the query can make a big difference. The query
has a cross product and a full scan (twice) in it. These can be avoided.
Support that
?rel rdfs:label ?lbl
FILTER ( lang(?lbl) = "en" )
is reasonably selective on properties. (the rdf:type may be more
selective.)
To do this first, you could try this query:
SELECT DISTINCT ?lbl
WHERE
{
{
?rel rdfs:label ?lbl
FILTER ( lang(?lbl) = "en" )
}
{ ?entity1 ?rel ?entity2 }
UNION
{ ?entity2 ?rel ?entity1 }
{
?entity1 rdf:type dbpo:Person .
?entity2 rdf:type dbpo:Place .
}
}
This part:
?entity1 rdf:type dbpo:Person .
?entity2 rdf:type dbpo:Place .
is possibly better merged with the union though (it's all down to your
data shape).
SELECT DISTINCT ?lbl
WHERE
{
{ ?entity1 ?rel ?entity2 .
?entity1 rdf:type dbpo:Person .
?entity2 rdf:type dbpo:Place .
}
UNION
{ ?entity2 ?rel ?entity1 .
?entity1 rdf:type dbpo:Person .
?entity2 rdf:type dbpo:Place .
}
{
?rel rdfs:label ?lbl
FILTER ( lang(?lbl) = "en" )
}
}
or
SELECT DISTINCT ?lbl
WHERE
{
{
?rel rdfs:label ?lbl
FILTER ( lang(?lbl) = "en" )
}
{ ?entity1 ?rel ?entity2 .
?entity1 rdf:type dbpo:Person .
?entity2 rdf:type dbpo:Place .
}
UNION
{ ?entity2 ?rel ?entity1 .
?entity1 rdf:type dbpo:Person .
?entity2 rdf:type dbpo:Place .
}
}
may be better (label/filter before or after the UNION.
Refining that: if there are less places than people:
SELECT DISTINCT ?lbl
WHERE
{
# Whether the "dbpo:Place" or the filter block is better
# needs experimentation.
?entity2 rdf:type dbpo:Place .
{
?rel rdfs:label ?lbl
FILTER ( lang(?lbl) = "en" )
}
{ ?entity1 ?rel ?entity2 .
}
UNION
{ ?entity2 ?rel ?entity1 .
}
?entity1 rdf:type dbpo:Person .
}
If you try these, could you please let us know what effect that have?
Finally, if you run your example just once, then you also incur the
database warming up costs as a program starts with no database cached.
Especially true with an HD, rather than an SSD.
Andy
Re: TDB Optimization
Posted by ba...@gmail.com.
On Sat, 14 Mar 2015 02:43:59 +0100, Abduladem Eljamel
<a_...@yahoo.co.uk> wrote:
> Hi All
>
> I loaded DBPedia RDF dump File to JenaTDB store. The triples were loaded
> successively including the indexingphase and “stats,opt” file was
> created; however, the SPARQL queries are notworking for complex queries.
> It takes very long time (and non-stop runningsometimes). I ran
> “tdbstats” command to optimize TDB but there was no change tothe query
> running or to “stats.opt”. The “tdbstats” command does not create
> anyOptimizer control file.After I removed the “stats.opt” fileand ran
> the query, I got a result even after a very long time. I tried those
> opertions in two kind of computers. The first is with Windows7-x64,Intel
> i7 4 cores, 32GB RAM. 2TB HD. The second is with OS X 10.10.2, Intel
> i7,16GB RAM, 1TB
> HD.**************************************************************
> The query that I am using to test
> is:*******************************************************************
> PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#>PREFIX dbpo:
> <http://dbpedia.org/ontology/>PREFIX rdf:
> <http://www.w3.org/1999/02/22-rdf-syntax-ns#>SELECT DISTINCT ?lblWHERE
> { { ?entity1 ?rel ?entity2 } UNION { ?entity2 ?rel ?entity1
> } ?entity1 rdf:type dbpo:Person . ?entity2 rdf:type dbpo:Place
> . ?rel rdfs:label ?lbl FILTER ( lang(?lbl) = "en" )}
> ********************************************************************
> the JAVA code to run query
> is:************************************************************************
> Location location = new Location("C:/myFiles/RDF-DBPedia/TDB-DP") ;
> Dataset dataset = TDBFactory.createDataset(location);
> dataset.begin(ReadWrite.READ) ;
> try{
> QueryExecution ex = QueryExecutionFactory.create(query, dataset);
> ResultSet res = ex.execSelect() ;
> ResultSetFormatter.out(res) ;
> } finally {
> dataset.end() ;
> }
> ******************************************************************
>
> The total time taken in Windows was: 20 minutes 34seconds.The total time
> taken in MAC was: 26 minutes 58seconds.The total time taken in online
> DBPedia endpoint was seconds.My question is: what kind of instructions
> or stepsI miss to get query results in a local TDB storage faster?
> Thanks in advanceAbdul
------------------------------------------------------------------------
I can remember i have had also a serious time-problem with the following
UNION-query (FUSEKI 1.1.1 + my local Dbpedia) where online
Dbpedia with Virtuoso responds promptly(!). Take any query with:
{?x skos:broader <category URI>} UNION
{?x skos:broader [skos:broader <category URI>]}
The problem was with <...> in [skos:broader <category URI>] for any
correct URI. Perhaps is this a useful hint also for the described problem
in this thread.
I have had the feeling that a stumbling block in the implementation makes
a proper usage of this UNION-case impossible for a real world app
ASSUMED it is correct per SPARQL spec and hope we can clear this now...
thanks, baran.