Hi everyone,
I am using php on Apache and querying Virtuoso RDF graph using ODBC.
Everyithing on my localhost...
I have two questions today :p
A)
Yesterday I got an Virtuoso (opensource) error saying:
/
odbc_exec() [function.odbc-exec]: SQL error: [OpenLink][Virtuoso ODBC
Driver][Virtuoso Server]VD032: remote prepare: SQ200: The memory pool
size 400195584 reached the limit 400000000 bytes, try to increase the
MaxMemPoolSize ini setting/
and by putting MaxMemPoolSize to a bigger value I was again getting the
results for my queries from Virtuoso graph.
The problem is that now my queries are returned in 10-15 seconds?!
When I write a simple query such as:
SELECT *
WHERE
{
?ab rdf:type gr:Offering .
}
I don't wait more than a second but for the following one I wait those
10-15 sec:
/SELECT * FROM <http://localhost:8890/advisor>
WHERE
{
?ab rdf:type gr:Offering .
?ab gr:includesObject ?tqn .
?ab gr:hasPriceSpecification ?hps.
?hps gr:hasCurrencyValue ?hcv.
?tqn rdf:type gr:TypeAndQuantityNode.
?tqn gr:typeOfGood ?UniqueID.
?UniqueID sa:hasCalories ?qvf.
?UniqueID sa:hasImage ?image.
?UniqueID sa:hasDescription ?description.
?qvf gr:hasValueFloat ?calories.
FILTER(?UniqueID =
<http://www.shoppingadivsor.com/ontologies/sa#idendtifier10>)
}/
When I run this query directly in conductor SPARQL form I receive result
in milliseconds so I guess the problem has to do
something with ODBC and not Virtuoso querying engine performance.
If you have any suggestions I would appreciate that...
B)
Another question is regarding a SPAQRL query.
My RDF graph represents a model of a products store. Store has products
of /type:Milk, type:Cereals/ etc.
<http://www.shoppingadivsor.com/ontologies/sa#Milk_5>
a sa:Milk;
sa:hasImage "milk_5.jpg";
sa:hasDescription "This is authentic boob milk :D ";
sa:hasCalories
<http://localhost/ontologies/sa#QuantitativeValueFloat_5>.
<http://www.shoppingadivsor.com/ontologies/sa#Cereals_5>
a sa:Milk;
sa:hasImage "milk_5.jpg";
sa:hasDescription "This is authentic boob milk :D ";
sa:hasCalories
<http://localhost/ontologies/sa#QuantitativeValueFloat_5>.
sa:*someOtherProperty*<...>.
sa:*someOtherProperty*<...>.
Is there a way to get all the properties of a specific node by using the
same SPARQL for both product types?
I mean how can I make a query that will return all the values of every
particular predicate ?
Meaning, In my application I want to have one SPARQL query that will be
as general as possible so that I can use it on
any product stored in RDF store and get all the values for predicates of
that node?
Uh, I hope I didn't complicate things tooooo much :)
Best regards,
Luka