This was discussed in the Help forum:
A query that my application is using is taking a very long time (over a minute of CPU time) and eating lots of memory. The same query takes much less than a second on Fuseki, so I think there might be a problem somewhere. I'm using the stock configuration, except I've enabled quads mode and the text index (not used in the query). I'm running Bigdata inside Tomcat on Ubuntu 12.04 amd64.
First, you can load the data I'm using into Bigdata using this SPARQL Update statement:
The dataset is a SKOS vocabulary with about 300k triples. You can get it from the above URL but I will also attach the file (ysa.rdf gzipped) to this ticket.
Then run this query:
I will also attach the Explain result for the query to this ticket.
It appears that Bigdata performs the BIND assignment very late in the query processing. Jena ARQ (in Fuseki) instead will do it first, saving lots of time.
I tested both Bigdata 1.2.2 and the SVN head RELEASE_1_2_0 of yesterday. In both cases the result was similar.
BLZG-876, which may have the same underlying issue.