Re: [Virtuoso-users] Best way to query a random sample?

2011-04-11 Thread Ivan Mikhailov
Hello Konrad, The best, as usual, is decimation in its original style. E.g. select ?s ?p ?o from where { ?s ?p ?o . FILTER (1 > bif:rnd (10, ?s, ?p, ?o)) } By tweaking first argument of bif:rnd() and the left side of the inequality you can tweak decimation ratio from 1/10 to the desired valu

[Virtuoso-users] Best way to query a random sample?

2011-04-11 Thread Konrad Höffner
Hello, I would like to know the best method to get a random sample of all triples for a subset of all the resources of a SPARQL endpoint, e.g.: select ?s ?p ?o where {?s ?p ?o. {select ?s where {?s a dbpedia-owl:Settlement} limit 5}} The problem here is that the choice of resources returned