Thanks everybody,
I've managed to accomplish exactly what I wanted using the query you
provided me and including it into another
select
?go count(?go)
where
{
{select distinct ?protein
where {
?protein rdf:type <http://biology.com/Protein> .
}
order by order by asc (bif:rnd(2000000000, ?protein))
limit 100 } .
?protein <http://biology.com/xGO> ?go .
}
order by count(?go)
I would still like too found the bif:rnd specification. I'm lost into
the Virtuoso Docs and can't find it. I think the first parameters is
the seed of the random, but I'm not 100% sure about it.
Thanks,
Marc-Alexandre
2010/1/21 Ivan Mikhailov <[email protected]>:
> Hello Marc-Alexandre,
>
> The proper trick is
>
> select distinct ?s
> where {
> ?s rdf:type <http://biology.com/Protein> .
> }
> order by order by asc (bif:rnd(2000000000, ?s))
> limit 100
>
> but this is a costly thing because it should find all proteins during
> the run. If you need random sampling on a regular basis, like choosing
> approx. 1/10000 of database on a random-decimation style then it may be
> convenient to extend the database with some "random-index" property, one
> triple per subject, and filter by it.
>
> Best Regards,
>
> Ivan Mikhailov
> OpenLink Software
> http://virtuoso.openlinksw.com
>
>
>
> ------------------------------------------------------------------------------
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for Conference
> attendees to learn about information security's most important issues through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev
> _______________________________________________
> Virtuoso-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/virtuoso-users
>