> ?loc :workLocationVolume ?bvol .?loc :locatedInWork ex:Work1 ;
> :startVolume ?startvol .
> FILTER ((?bvol = ?volnum && NOT EXISTS {?loc :workLocationEndVolume
> ?evol}) || (?bvol <= ?volnum && EXISTS {?loc :workLocationEndVolume
> ?evol FILTER (?evol <= ?volnum)}))
>
> In terms of logic is should be equivalent to the previous query,
> should there be a performance difference? My experiments show that
> this version is quite consistently twice as fast as the OPTIONAL
> version.
>
At least, this query avoids the left-join, so yes, there's a good chance
being executed faster.