`FILTER EXISTS` breaks `LIMIT`
When running the following query, I get 10000 results (the result limit) while I expected 1.
prefix premis: <http://www.loc.gov/premis/rdf/v3/>
select distinct * where {
?id a premis:File .
filter exists {
?id a premis:File .
}
} limit 1
Unfortunately, I can't share the dataset, which makes reproducing the issue difficult, but the limit should work in any case. I'm not sure, but it only seems to happen when the result size is larger or equal to the configured limit of 10000. We're using version 7.2.6-7. Furthermore, this also breaks the use of OFFSET, which no longer has any effect.
I tried a similar query
select distinct * where {
?p a schema:Person.
filter exists {
?p a schema:Person.
}
} limit 1
on https://dbpedia.org/sparql, but that works fine.
You indicate running Virtuoso 7.2.6-7, which is not an official Virtuoso Open Source release and is rather old, thus where did you acquire it from? In any case, we would recommend that you upgrade to the latest Virtuoso 7.2.13 Open Source release and see if the problem persists.
Have you run a database integrity check to determine if there might be any corruption in the database?
Sorry, the -7 is an image name by our service provider. I'll do a test locally.