Re: [Virtuoso-users] getting large SPARQL result sets

2014-03-24 Thread Hugh Williams
Hi Jakub, For a stable/consistent pagination, ORDER BY is always necessary. Even if data are constant and statistics of indexes are not refreshed between fetching different pages, the optimizer can chose different ordering depending on number of rows to skip and return. Best Regards Hugh Willi

[Virtuoso-users] getting large SPARQL result sets

2014-03-24 Thread Jakub Kotowski
Hello everyone, what is the recommended way of getting large SPARQL result sets? Normally one should paginate through the results by LIMIT and OFFSET. But that normally requires ORDER BY to get consistent results. Are there some circumstances under which the ORDER BY would not be necessary? For

Re: [Virtuoso-users] SPARQL OPTIONAL performance

2014-03-24 Thread Jerven Tjalling Bolleman
Hi Nicola, A slightly faster form is to make one OPTIONAL with an UNION instead of two OPTIONALs. e.g. CONSTRUCT { ?p ?o. ?sub ?p_sub ?o_sub. ?type ?p_type ?o_type. } where { ?p ?o OPTIONAL { {