Hi,
thanks! I'll try that when get chance to stop jena. Yes we are using TDB.
On 26.10.2017 16:15, Rob Vesse wrote:
Is TDB the underlying database?
If so is there a stats.opt file in your database directory?
I remember there being issues in the past with the statistics for rdf:type
triples being wrongly prioritised. You might want to look at that file,
assuming that it exists, and you try adjusting values associated with rdf:type
based upon the guidance in the documentation:
http://jena.apache.org/documentation/tdb/optimizer.html#statistics-rule-file
Also if this is a database which is being updated then the statistics can get
out of date relative to the database. You can use the commandline tdbstats tool
to try regenerating this:
http://jena.apache.org/documentation/tdb/optimizer.html#generating-a-statistics-file
Note that you will need to stop Fuseki in order to run this as only a single
process is permitted to access a TDB database at a time
Rob
On 26/10/2017 13:47, "Mikael Pesonen" <[email protected]> wrote:
Hi, I have trouble understanding why the first query is slow and second
one is fast. Using Jena Fuseki 3.4.0.
So I want to get all resources that reference <some resource>, and their
types:
SELECT * WHERE
{
GRAPH ?g
{
?s ?p <some resource> .
?s a ?type
}
}
SELECT * WHERE
{
GRAPH ?g
{
?s ?p <some resource> .
?s ?p2 ?o2
}
}
First one takes 5 seconds which is too slow for our application. Can it
be rearranged somehow to make fast? Sorry if this is not a correct forum
for this.
Thanks!
--
--
Lingsoft - 30 years of Leading Language Management
www.lingsoft.fi
Speech Applications - Language Management - Translation - Reader's and Writer's
Tools - Text Tools - E-books and M-books
Mikael Pesonen
System Engineer
e-mail: [email protected]
Tel. +358 2 279 3300
Time zone: GMT+2
Helsinki Office
Eteläranta 10
FI-00130 Helsinki
FINLAND
Turku Office
Kauppiaskatu 5 A
FI-20100 Turku
FINLAND