Hi Curran,
Il 27/05/2011 4.36, Curran Kelleher ha scritto:
According to the SPARQL reference
<http://www.w3.org/TR/rdf-sparql-query/#modDistinct>, DISTINCT should
even be an operation able to be performed after evaluation of LIMIT
which just collapses duplicate entries in the intermediary result set
into single entries in the final result set... Am I mistaken with
this? Is there something more to the definition of DISTINCT than the
requirement that no duplicate entry exists in the /result set/ (not in
the entire database)?
actually the SPARQL reference says "Note that, per the order of solution
sequence modifiers
<http://www.w3.org/TR/rdf-sparql-query/#solutionModifiers>, duplicates
are eliminated before either limit or offset is applied." So DISTINCT
acts before, and then LIMIT is applied. So as you can imagine,
distinguing all the values in a query like ?s ?p ?o, before limiting the
resultset, is onerous on big graphs.
This is logical: imagine that LIMIT was executed before, and then
DISTINCT: you could obtain less values than what you specified in the
LIMIT clause.
Neverthless I don't know if in some situations (as Baran was pointing
out) some optimizations could be performed. Well, I think Kingsley is
the most authoritative man for such answers. :-)
Thanks for bearing with me here :)
Best regards,
Curran
Best regards,
roberto
On Thu, May 26, 2011 at 7:07 PM, Kingsley Idehen
<kide...@openlinksw.com <mailto:kide...@openlinksw.com>> wrote:
On 5/26/11 5:35 PM, baran_H wrote:
> Without 'distinct' it does work:
> select ?property where {
> ?s ?property ?o.
> } limit 1
>
> Why might this be?
So you are asserting that for a given data space hosting N named
graphs
(named collections of triples) :
select ?property where {
?s ?property ?o.
} limit 1
and
select distinct ?property where {
?s ?property ?o.
} limit 1
and
select ?property from <namedGraphIRI> where {
?s ?property ?o.
} limit 1
and
select ?property where { graph ?g {
?s ?property ?o.
} } limit 1
are equivalent.
Again, I say, no re. cost of solution.
--
Regards,
Kingsley Idehen
President& CEO
OpenLink Software
Web: http://www.openlinksw.com
Weblog: http://www.openlinksw.com/blog/~kidehen
Twitter/Identi.ca
<http://www.openlinksw.com/blog/%7Ekidehen%0ATwitter/Identi.ca>:
kidehen
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Dbpedia-discussion mailing list
Dbpedia-discussion@lists.sourceforge.net
<mailto:Dbpedia-discussion@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Dbpedia-discussion mailing list
Dbpedia-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion
--
Roberto Mirizzi
http://sisinflab.poliba.it/mirizzi
------------------------------------------------------------------------------
vRanger cuts backup time in half-while increasing security.
With the market-leading solution for virtual backup and recovery,
you get blazing-fast, flexible, and affordable data protection.
Download your free trial now.
http://p.sf.net/sfu/quest-d2dcopy1
_______________________________________________
Dbpedia-discussion mailing list
Dbpedia-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion