The rdf schema is entailed in question
sparql DESCRIBE query to get data about linked objects
The following query executes in a fraction of a second.
DESCRIBE ?book
where
{
?book a schema:Book ;
}
The describe query however doesn't give me author details. It returns only properties belonging to Book itself.
So i replaced the above query with the one entailed below.
CONSTRUCT
{
?book a schema:Book ;
schema:bookName ?bookName ;
schema:bookId ?bookId ;
schema:authoredBy ?author .
?author a schema:Person ;
schema:personName ?personName .
}
where
{
?book a schema:Book ;
}
However the above sparql query takes 4 seconds for execution.
Is there way to optimize the sparql CONSTRUCT
OR
should we be using SELECT always instead of CONSTRUCT