[ https://issues.apache.org/jira/browse/JENA-1257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andy Seaborne updated JENA-1257: -------------------------------- Comment: was deleted (was: This appears to be related to the changes for JENA-1171. That introduced deep analysis of the query whereas previous the scope analysis did not look inside EXISTS. ) > Bad performance with VALUES blocks > ---------------------------------- > > Key: JENA-1257 > URL: https://issues.apache.org/jira/browse/JENA-1257 > Project: Apache Jena > Issue Type: Bug > Components: ARQ > Affects Versions: Jena 3.1.1 > Environment: Ubuntu 12.04 LTS amd64 > java version "1.8.0_91" (Oracle) > Reporter: Osma Suominen > Labels: performance > Attachments: explain.zip > > > I'm having performance issues with a query involving VALUES blocks. It seems > to me that the values are bound to variables too late, which causes long > execution times. > Also discussed on users list: > http://mail-archives.apache.org/mod_mbox/jena-users/201611.mbox/%3c58185a49.7060...@helsinki.fi%3e > Steps to repeat: > 1. Create a TDB with YSO: > {noformat} > wget http://api.finto.fi/download/yso/yso-skos.ttl > tdbloader --loc YSO yso-skos.ttl > {noformat} > 2. Run the below query against the TDB: > {noformat} > tdbquery --loc YSO --query ysoslowunion.rq > {noformat} > Contents of ysoslowunion.rq: > {noformat} > PREFIX skos: <http://www.w3.org/2004/02/skos/core#> > SELECT * > WHERE { > VALUES ?uri { <http://www.yso.fi/onto/yso/p864> } > { ?s ?p ?uri } > UNION > { ?uri ?p ?o > OPTIONAL { > ?x skos:member ?o . > FILTER NOT EXISTS { > ?x skos:member ?other . > FILTER NOT EXISTS { > ?other skos:broader ?uri > } > } > } > } > } > {noformat} > With Jena 3.1.0 this takes <1 second. > With current 3.1.1 snapshot it takes 12 seconds. > Possibly related to changes made in JENA-1167. > I will attach --explain output for both versions as a zip. The 3.1.1 output > is 473 MB uncompressed. -- This message was sent by Atlassian JIRA (v6.3.4#6332)